Hi Tony,
Â
Thank you for the suggestion. For first option , I tried putting for loop before using jqgrid function , but I m getting errorÂ
Â
. . . ! 1 ) , this . each ( function ( ) { var X = f . length ; n = ! 0 === this . p . rownumbers ? 1 : 0 ; h = ! 0 === this . . .
in jquery.jqGrid.min.js on line no 149 !!Â
Second option is not clear to me Â
Even i went through few examples , but could not get an idea on dynamic grouping. Can you please suggest on this?
Thanks a lot,
Shraddha
Â
EDIT: Hi Tony,
Â
Now I removed addRowData from the code and using addJSONData. With this, its grouping the data only at first level but till limited rows. Following is the code :
showJQgrid :function(sysObj)
{
var Jsj = sysObj.filteredData;
$(‘#grid’).jqGrid({
datatype : ‘json’,
colNames:,
colModel:[
{name:’MARKET’,index:’MARKET’, width:100},
{name:’SECTOR/REGION’,index:’SECTOR/REGION’, width:100},
{name:’PRODUCT’,index:’PRODUCT’, width:150},
{name:’DATE’,index:’DATE’, width:85, sorttype:”date”, formatter:”date”},
{name:’LAST-CLOSED’,index:’LAST-CLOSED’, width:100, sorttype:”float”,formatter:”number”,editable:true},
{name:’VOLUME’,index:’VOLUME’, width:100, align:”right”,sorttype:”float”, formatter:”number”, editable:true},
],
pager : ‘#pager’,
rowNum:20,
rowList : [10, 30, 50 ],
viewrecords : true,
gridView:true,
grouping:true,
groupingView : {
groupField: ,
groupColumnShow: [true,true],
groupCollapse: true,
},
});
jQuery(“#grid”)[0].addJSONData(Jsj);
$(“#grid”).trigger(‘reloadGrid’);
$(“#grid”).jqGrid(‘navGrid’,”#pager”, {edit : false,add : false,del : false});