I am working on JqGrid.
I want to know what does it mean if we specify gridview:true
.
And in what cases do we need to provide ?
I recen
According to the jqGrid documentation for gridview
:
In the previous versions of jqGrid including 3.4.X, reading a relatively large data set (number of rows >= 100 ) caused speed problems. The reason for this was that as every cell was inserted into the grid we applied about 5 to 6 jQuery calls to it. Now this problem is resolved; we now insert the entry row at once with a jQuery append. The result is impressive - about 3 to 5 times faster. What will be the result if we insert all the data at once? Yes, this can be done with a help of gridview option (set it to true). The result is a grid that is 5 to 10 times faster. Of course, when this option is set to true we have some limitations. If set to true we can not use treeGrid, subGrid, or the afterInsertRow event. If you do not use these three options in the grid you can set this option to true and enjoy the speed.
So by using this option you can get a nice speed improvement, with the caveat that it is not compatible with treeGrid, subGrid, or afterInsertRow
. I believe that is the extent of the limitations. If you find any more, let us know so the documentation can be updated.
For what it's worth, you can actually see specific cases in grid.base.js
methods addXmlData
and addJSONData
where afterInsertRow
is skipped:
if(ts.p.gridview === false ) {
$("tbody:first",t).append(rowData.join(''));
$(ts).triggerHandler("jqGridAfterInsertRow", [rid, rd, xmlr]);
if(afterInsRow) {ts.p.afterInsertRow.call(ts,rid,rd,xmlr);}
rowData=[];
}
The treeGrid and subGrid limitations are more subtle and are not explicitly called out in the code.