jquery - How to bind ajax result to jqxGrid -


how can bind ajax result jqxgrid? got confused on how right way because in jqxgrid samples source text file. give me idea right way big help

as of here ajax code returning result

$.ajax({         type: 'post',         url: 'ws.asmx/getstudentsbyid',         contenttype: 'application/json; charset=utf-8',         datatype: 'json',         data: json.stringify({             studid: id         }),         success: function (data) { var toappend ='<table>'; $.each(data, function (key, val) { (var = 0; < val.length; i++) {     toappend+='<tr>';     toappend+='<td>'+val[i]['studid']+'</td>';     toappend+='<td>'+val[i]['studname']+'</td>';     toappend+='</tr>'; } toappend += '</tbody></table>';             }); $('#results').append(toappend);           } 

});

under success want change jqxgrid , dont know how should start it. thanks

you need change datatype xml you're using legacy asmx service gets content xml default, not json.

http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -