jQgrid is awesome but I need only the grid. How?
I have a HTML table (HTML with table is a static file on server). I came across jQgrid to serve my purpose of converting the table to grid. I used a function 'tabletogrid' and was successful.. I liked this plug-in usability. But I have a small issue. I am only concerned about the grid. and I do not 开发者_JS百科need any sorting functionality. I would like to remove few code blocks in JQgrid script and retain only the grid property. Please suggest! I need to minimize the .js files. I do not need unused functions..
You don't need to modify the jqGrid source code. Instead of that you can use sortable:false
in every column definition of the grid to switch of sorting in all columns.
If you use the last version of jqGrid you can use new feature introduced in jqGrid 3.8.2: the column template (see my suggestion in the trirand forum which is implemented with small changes). Because you need to set an additional property in all columns of colModel
you can just use cmTemplate
parameter as cmTemplate:{sortable:false}
:
tableToGrid('#yourGridId', {cmTemplate:{sortable:false}});
If you go to the download page of jqGrid you can choose what to include in your script file. If you only need the grid you can just check "grid base". An alternative would be this one
精彩评论