English 中文(简体)
在我的JqGrid
原标题:problem getting json data inside my JqGrid
  • 时间:2010-08-23 17:50:53
  •  标签:
  • json
  • jqgrid

我对我的格网中的数据表示质疑。 我的逊尼派数据以这种形式出现。

[
    {
        "orderNumber": "5917500220100811",
        "chainNumber": "1",
        "divisionNumber": "1",
        "customerNumber": "37029",
        "loadNumber": "59175",
        "orderType": "1",
        "stopSeq": 2,
        "latestTime": "Aug 13, 2010 1:12:21 PM",
        "orderStatus": "6",
        "batchNumber": "1059",
        "maxPalletCube": "1982179262",
        "billingFlag": "N",
        "orderDetailsList": [],
        "id": 2384,
        "createdDate": "Aug 11, 2010 6:54:48 PM",
        "createdUser": "USER",
        "lastModifiedDate": "Aug 13, 2010 10:12:21 AM",
        "lastModifiedUser": "USER"
    },
    {
        "orderNumber": "5917500120100811",
        "chainNumber": "1",
        "divisionNumber": "1",
        "customerNumber": "37003",
        "loadNumber": "59175",
        "orderType": "1",
        "stopSeq": 1,
        "latestTime": "Aug 13, 2010 1:12:21 PM",
        "orderStatus": "6",
        "batchNumber": "1056",
        "maxPalletCube": "1982179262",
        "billingFlag": "N",
        "orderDetailsList": [],
        "id": 2385,
        "createdDate": "Aug 11, 2010 6:54:48 PM",
        "createdUser": "USER",
        "lastModifiedDate": "Aug 13, 2010 10:12:21 AM",
        "lastModifiedUser": "USER"
    }
]

我的吉杰里和我。

jQuery("#list10").jqGrid({
    url:  /cpsb/json/test.json ,
    datatype: json ,
    colNames:[ Order , Load ,  Gate Time ,  Stop , Customer , Status ], 
    colModel:[  
        {name: orderNumber ,index: orderNumber , width:55, sorttype:"int"},
        {name: loadNumber ,index: loadNumber , width:100, sorttype:"int"},
        {name: latestTime ,index: latestTime , width:80, align:"right",
         sorttype:"date", formatter:"date"}, 
        {name: stopSeq ,index: stopSeq , width:80, align:"right", sorttype:"int"},
        {name: customerNumber ,index: customerNumber , width:130,align:"right",
         sorttype:"int"},
        {name: orderStatus ,index: orderStatus , width:150, sortable:true} ],
    rowNum:10,
    rowList:[10,20,30],
    pager:  #pager10 ,
    sortname:  Gate Time ,
    sortorder: "desc",
    viewrecords: true,
    multiselect: true,
    caption: "Order Header"
});

我在这里做的是错的。

最佳回答
问题回答

阁下是错的。 你们只包括数据,而不是另一个电网要求的数据(记录、页数等)。 你们必须使用





相关问题
JQuery/MVC Search Issue

I have inherited a piece of work where the entry screen shows a summary of 20 calculated variables. E.g. Var A (250), Var B (79). Clicking on any of these links takes the user to a view with a ...

jQuery quicksearch plug-in tinkering with JSON

I ve implemented the quicksearch plugin by Rik Lomas and I love it for an application in a custom CMS I m building. I was wondering though, since I m going to have a bizillion items in the table if ...

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

PHP json_decode question

i m trying to use json_decode to combine a few json objects and then re-encode it. my json looks like: { "core": { "segment": [ { "id": 7, "...

Converting JSON data to Java object

I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string ...

热门标签