shrads

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: Jqgrid not grouping columns with json data #102272
    shrads
    Participant

    Hi Tony,

     

    Thank you for the suggestion. For first option , I tried putting for loop before using jqgrid function , but I m getting error 

     

    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});

Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!