Hi,
I tried drop down check box in my toolbar. Followings are the code I have used. If ajax call return a data then only this code will run. Here already select option is there with single select. If am using multiple select in same toolbar the drop down is not working properly. If I remove attr: "multiple='multiple'" from my code it is working like single select. In other grid I have this multiple select alone that is working fine please correct me what I am doing wrong.
$.ajax({
url : "getDraftCutDate",
success : function(response)
{
function_two(response);
var toolbar = {
items : [
{
type : "<span style='margin:5px;width:90px;'>Draft Date</span>"
},
{
type : 'select',
size:'4',
cls : "cutdate",
listeners : [ {
'change' : pqFilter.search
} ],
options : function(ui) {
var opts = [];
var cjson = eval('(' + response + ')');
for (var i = 0; i < cjson.length; ++i) {
opts.push(cjson[i].draftCutdate);
}
return opts;
}
},
{type:"<span style='margin:3px;'>SELECT COLUMNS TO BE VISIBLE: </span>"},
{ type: 'select', cls: 'columnSelector', options: function (ui) {
var opts = [{'SPECIAL FEATURES':'SPECIAL FEATURES','IFO':'IFO (PER DAY CONS)','MGO':'MGO/MDO (PER DAY CONS)','WEIGHT':'WEIGHT','DISPLACEMENT':'DISPLACEMENT'}];
return opts;
}, attr: "multiple='multiple'"
},
]
};
$("#vessel_tab_main").pqGrid("option", "toolbar", toolbar);
$("#vessel_tab_main").pqGrid("refreshDataAndView");
}
});