jquery easyui datagrid tab displays the total number of records

jquery easyui datagrid tab displays the total number of records

Use jquery easyui datagrid paging in the background to get the total number of records, how the front desk to receive the parameters and displays the total number of records it?

{
    "total": 2,
    "rows": [{
        "ID": 1,
        "PropertyName": "颜色",
        "SubTime": "\/Date(1405084530147)\/",
        "ReMark": null
    }, {
        "ID": 2,
        "PropertyName": "",
        "SizeSubTime": "\/Date(1405084568650)\/",
        "ReMark": null
    }]
}
This is my return Json data, the total number is total, serialized json data in the background with time should be "total"
 
There is not just the background to return { "total": 10} such data, reception total number of pages can be reality, what you do not need to set any parameters or receiving? ,
 
Well, easyui gave some good. As long as this brought with it.
 
There are two parameters passed to the front end of the background
page the current page
rows pass this page

back to return a reception json string
{
    Total: 15, the number of records in the database // Number of
    rows: [
        {}, // record the first page
        {}, // page second record
        {},
        {},
        {},
        {},
        {},
        {},
        {},
        {} // page records Article X
    ]
}
rows in a long discharge data like, when you turn, datagrid page to re-pass the background, when you receive a new page, then another page reorganize json string data
 

Guess you like

Origin www.cnblogs.com/leijiangtao/p/11752742.html