Hi,
Thanks for your quick reply. I tried your suggestion. Below is my code:-
function selectAll(evt) //function called on onchange of Select All Checkbox
{
var isChecked = $("#cbxAll").is(":checked");
var rowIndex;
var data = gridData.dataModel.data;
for (var i = 0; i < data.length; i++)
{
data[0] = isChecked;
$("#grid-json").pqGrid("refreshCell", { rowIndx: i, dataIndx: 0 });
}
}
I have also added render function as below:-
success: function (data)
{
gridData = data;
$.extend(data.colModel[0],
{
render: function (ui)
{
var rowData = ui.rowData, dataIndx = ui.dataIndx;
var val = rowData[dataIndx];
str = "";
if (val)
{
str = "checked='checked'";
}
return "<input type='checkbox' class='cbx' style='margin:0' " + str + "onChange='cbxChange(this)'/>";
}
});
$grid1 = $("#grid_json").pqGrid(data);
This render function runs properly first time when grid is loaded. But it should also run when I am calling refreshCell in SelectAll function which is not happening. Please suggest.