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.
Comments
Post a Comment