How to use jqGrid with C#/ASP.NET and JSON.NET (and no AJAX.NET stuff)? -


OK, I see this in a few days and especially not sure what I'm doing I'm wrong. If there are any examples of working with the use of jqGrid with C # / ASP.NET and open source tools, please, please tell me where to find them. Any tips I can use to debug a decent document or device, it will be most appreciated (I am new to JS / JN). Actually I just need the functionality of editing-in-place, so if I'm looking at another obvious solution for this, it can be useful to know ... I would like to avoid using AJAX.NET. P>

I think I'm really looking somewhere here.

In the following example, I get jqGrid to display, but it does not show any data.

Here is the relevant javascript:

  jquery (document) .ready (function () {jQuery ("# ​​role_assignment_table"). JqGrid ({url: 'http : // localhost: 4034 /? Website2 / PageItemHandler.asmx / GetPageItemRolesJson id = 3 ', MTYPE:' received ', contentType: "application / json; charset = utf-8", datatype: "jsonstring", colModel: [ {Name: 'Id', label: 'id', jsonmap: 'id'} {name: 'title', jsonmap: 'title'} {name: 'AssignedTo', label :, 'assigned to' jsonmap ' 'AssignedTo'} {Name: 'Assign', JasonMap: 'Assign'}, {name: 'cause', jesenmap: 'cause'}, {name: 'full', jesenmap: 'full'}], jasonrider: { Pages: "Pages", Total: "Total", Record: "Records", Route: "Rows", Replaced: Incorrect, ID: "ID"}, Line Number: 10, Line List: [10,20,30], IMGpith: 'JS / Themes / Basic / Images', Viewcards: Fotal, Caption: "Roll Assetments"})});  

HTML:

  & lt; Table id = "role_assignment_table" class = "scroll" cellpadding = "0" cell area = "0" /> Generic JSN:  I'm not sure whether it makes jqGrid, or if jqGrid does not like my JSON or my WebMethod, But when I go to the proper URL and get a JSON result string, I can say it myself. 1.0, "records": "rows": [{"id": 1, "item": blank, "title" : "Story Manager", "Assigned": blank, "Assigned": "\ / Date (1245186733 940-0500)" / "," Reason ":" \ / Date (1248383533 940-0500) "Title": "Analysis", "AssignedTo": Null, "AssignTo": "/", "complete": "\ / date (1247087533 940-0500) \ /"}, {"id": 2, "item" "Assigned": "\ / date (1245186733940-0500) \ /", "reason": "\ / date (1248383533940-0500) \ /", "full": "\ / date (1247087533940-0500) \ /" }, "Id": 3, "item": null, "title": "story", "assigned": null, "assigned": " / Date (1245186733940-0500) \ / "," reason ":" \ / date (1248383533940-0500) \ / "," whole ":" \ / date (1247087533940-0500) \ / "}, {" id " : "Item": Null, "Title": "Graphic", "AssignedTo": Null, "Assigned": "\ / Date (1245186733940-0500) \ /", "Reason": "\ / Date (1248383533940  

Before doing anything, Download and install:

This will let you see if the request is being requested and the JqGrid requests are being sent. Back to the JSON data.

I have some code for a working jqGrid, and here's something different:

  Datatype: "Jason"  
< P> Instead of:

  Datatype: "jsonstring"  

I also have a field called colNames. I code> which is the column name strings Has an array of

Finally, I have a pager field that recognizes an element that will store paging controls, and have a div. / P>


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -