3
« on: February 19, 2017, 03:35:22 pm »
Hi,
I am populating the pq grid on ajax success. I am able to refresh the data and view at once. But if user has scrolled the grid horizontally, the next refresh is not displaying the grid data and header. Sample code is :
/** check for existing instance, if present then change col model,data*/
if($demoPQGrid.pqGrid('instance')){
//refresh grid data and view
$demoPQGrid.pqGrid( "option" , "colModel",pqGridColumns);
$demoPQGrid.pqGrid( "option" , "dataModel.data",jsonData.data );
$demoPQGrid.pqGrid("refreshDataAndView");
$demoPQGrid.pqGrid("option", "selectionModel.type", null);
var pqGridProperties = fnSetGridProperties(jsonData.data,pqGridColumns);
/** render grid */
$demoPQGrid.pqGrid(pqGridProperties);
}
var pqGridProperties = {
height: fnGetDocHeight() - fnGetDocHeight() * percentHeightPqGridDivWrapper / 100,
resizable:true,
showTop:false,
showToolbar : false,
showBottom: false,
virtualX: true,
rowBorders:true,
columnBorders:true,
virtualY: true,
virtualXHeader: true,
virtualYHeader: true,
colModel: pqGridColumns,
filterModel: { on: true, mode: "AND", header: true },
location: "local",
sorting: "local",
hwrap:false,
wrap:false,
dataModel: {data: pqGridData}
};