Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If seems to my that you make the same errors like <a href="https://stackoverflow.com/questions/5160045/jqgrid-cannot-call-asp-net-webmethod-but-can-with-ajax">here</a>.</p> <p>First of all I suppose that in the web method <code>GetOrders</code> you use <code>JavaScriptSerializer</code> to make serialization of the object which represent the row of the grid and your service return <code>string</code>. As the result the JSON representation of the data (the string) will be added to the object with <code>d</code> property <code>{d:result}</code> and all will be <strong>one more time</strong> converted to JSON. Instead of that your web method should just return the <code>List&lt;Order&gt;</code> type. You can verify this is you will use <code>thegrid.addJSONData(jQuery.parseJSON(data.d))</code> instead of <code>thegrid.addJSONData(data)</code></p> <p>I recommend you also don't use complex constructs of <code>$.ajaxSetup</code>, <code>$.ajax</code> and <code>$("#orders").jqGrid</code> with the <code>datatype</code> as the function. It was good for jqGrid before <code>ajaxGridOptions</code> and <code>serializeGridData</code> options was introduced. in jqGrid 3.6 and higher jqGrid can load data from almost any data source directly. See links from <a href="https://stackoverflow.com/questions/5160045/jqgrid-cannot-call-asp-net-webmethod-but-can-with-ajax">the answer</a> (<a href="https://stackoverflow.com/questions/2675625/setting-the-content-type-of-requests-performed-by-jquery-jqgrid/2678731#2678731">this</a>, <a href="https://stackoverflow.com/questions/3161302/jqgrid-page-1-of-x-pager/3161542#3161542">this</a>) for more details and code examples. You can also search for ajaxGridOptions<code>and</code>serializeGridData`.</p>
    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