Hello,
Sorry for delay. First of all You have to add normal dropdown list (select) into Your toolbar items:
{
type: 'select', style:"width:150px;",cls: "ddClass",
options: function (ui) {
var CM = ui.colModel;
var opts = [];//[{ '': '[ All columns ]' }];
for (var i = 0; i < CM.length; i++) {
var column = CM[ i ];
var obj = {};
obj[column.dataIndx] = column.title;
opts.push(obj);
}
return opts;
}
},
Then, just after grid initialization:
$grid= $("#gridContainer").pqGrid(obj);
$toolbar = $grid.find('.pq-toolbar-search');
$toolbar.find(".ddClass").multipleSelect().multipleSelect("checkAll"); //if You want to check all options at start
$grid.pqGrid("refresh");
And to get the selections:
dataIndxs = $toolbar.find(".ddClass").multipleSelect("getSelects");
(returns array)
Remember to include somewhere in Your HTML's head:
<link href="/multiselect/multiple-select.css" rel="stylesheet" />
<script type="text/javascript" src="/multiselect/jquery.multiple.select.js"></script>
Download it here:
https://github.com/wenzhixin/multiple-select