Note that there are some explanatory texts on larger screens.

plurals
  1. POJQGrid data is not loading with xml
    primarykey
    data
    text
    <p>I have already seen answer of similar question but it couldn't help. The grid is being displayed and even data is being passed but the only problem is its not getting loaded in jqGrid. i checked the response in browser, data is being sent in XML format. So, the only problem is its not getting displayed in browser. </p> <pre><code>var lastsel2; $(function(){ $("#list1").jqGrid({ //url:'process/roles/GetRoles1.php', url: 'processDragonDisplay.php', datatype: 'xml', mtype: 'GET', autowidth: true, height: 'auto', colNames:['name', 'body', 'active_flag','Action'], colModel :[ {name:'name', index:'name', search:true, sortable: true} ,{name:'body', index:'body', search:true, sortable: true} ,{name:'active_flag', index:'active_flag', width:30, sortable: true} ,{name: 'choice', index: 'choice',width: 50, sortable: false } ], pager: '#pager1', rowNum:10, rowList:[10,20,30], sortname: 'name', sortorder: 'asc', viewrecords: true, gridview: true, caption: 'Templates', editurl: 'processDragonDisplay.php', onSelectRow: function(id) { $('#rowID').html(id); //$('#userId123').attr('value', id); $('#list2').trigger("reloadGrid"); if(id &amp;&amp; id!==lastsel2){ jQuery('#list1').restoreRow(lastsel2); jQuery('#list1').editRow(id,true); lastsel2=id; } }, loadComplete: function(){ var ids = jQuery("#list1").getDataIDs(); for(var i=0;i&lt;ids.length;i++){ var cl = ids[i]; ce = "&lt;span class='ui-icon ui-icon-pencil' onclick=editData('"+cl+"');&gt;&lt;/span&gt;"; $("#list1").jqGrid('setRowData', ids[i] , { choice: ce }); } } }).navGrid("#pager1",{edit:false, add:false, del:true}); //$("#list1").jqGrid('inlineNav','#pager1', {edit:false, del: false, add: false}); }); </code></pre> <p>Response coming with XML data:</p> <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;rows&gt;&lt;page&gt;1&lt;/page&gt;&lt;total&gt;1&lt;/total&gt;&lt;records&gt;7&lt;/records&gt;&lt;row id='A-000002'&gt;&lt;cell&gt;foo&lt;/cell&gt;&lt;cell&gt;bar yes ok&lt;/cell&gt;&lt;cell&gt;Y&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;row id='A-000009'&gt;&lt;cell&gt;hello&lt;/cell&gt;&lt;cell&gt;hwq&lt;/cell&gt;&lt;cell&gt;Y&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;row id='A-000013'&gt;&lt;cell&gt;nnnnn&lt;/cell&gt;&lt;cell&gt;nnnn&lt;/cell&gt;&lt;cell&gt;n&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;row id='A-000007'&gt;&lt;cell&gt;t1&lt;/cell&gt;&lt;cell&gt;Your appointment for TOken at for will be at &lt;/cell&gt;&lt;cell&gt;Y&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;row id='A-000008'&gt;&lt;cell&gt;t1&lt;/cell&gt;&lt;cell&gt;Your appointment for TOken at for will be at &lt;/cell&gt;&lt;cell&gt;Y&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;row id='A-000011'&gt;&lt;cell&gt;test2&lt;/cell&gt;&lt;cell&gt;test2&lt;/cell&gt;&lt;cell&gt;n&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;row id='A-000015'&gt;&lt;cell&gt;wwwww&lt;/cell&gt;&lt;cell&gt;wwwww&lt;/cell&gt;&lt;cell&gt;g&lt;/cell&gt;&lt;cell&gt;&lt;/cell&gt;&lt;/row&gt;&lt;/rows&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload