senthilm

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: Reload grid with xmlstring #87545
    senthilm
    Participant

    This should re-load the grid with new source:

    LoadData = function() {

    var mygrid = $(“#list”)[0];

    sXML = “data1data2”

    if

    (!mygrid.grid) {

    jQuery(“#list”).jqGrid({datatype: 'xmlstring',datastr: sXML,width: 400,colNames: ['cell 1', 'cell 2'],colModel: [{ name: 'cell1', index: 'cell1', width: 75 },{ name: 'cell1', index: 'cell2', width: 190}],pager: jQuery('#pager'),rowNum: 10,rowList: [10, 50, 100], viewrecords: true,imgpath: 'themes/basic/images',caption: 'My first grid'}).navGrid('#pager', { add: true, edit: true, del: true});}

    else

    { sXML = “new data1new data2”

    $(“#list”).setGridParam({ datatype: 'xmlstring', datastr: sXML }).trigger(“reloadGrid”

    );}}

    <input type=button onclick="LoadData()" value="Re-Load Grid"

Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!