How do I get jqGrid to work using ASP.NET + JSON on the backend?

前端 未结 8 1657
无人及你
无人及你 2020-12-08 06:10

ok, I\'m back. I totally simplified my problem to just three simple fields and I\'m still stuck on the same line using the addJSONData method. I\'ve been stuck on this for d

8条回答
  •  无人及你
    2020-12-08 06:29

    well i see one thing wrong here:

    var tbl = jQuery('table.scroll')[0];  
     //tbl.addJSONData(objGridData); //error received: addJSONData not a function  
    

    if you are indeed wondering why you are getting this error, it is because tbl does not have that function.

    Edit: i got curious, and checked if jqGrid added those methods to the DOM reference object. and they did. (i checked using firebug here: http://trirand.com/jqgrid/jqgrid.html).

    One thing that may be happening here is that you have multiple tables of class 'scroll' and your jquery is returning the wrong one.

提交回复
热议问题