Jquery ligerui tutorial table (2) server data interaction jquery ligerui table ligergrid combined with ASP. net mvc display data jquery liger UI liger

Source: Internet
Author: User

Reading directory
    • Use Remote Data
    • Use Remote Data Sorting
    • Use Remote Data Paging
Use Remote Data

Ligergrid allows you to specify a URL to load data, and supports sorting and paging. There are certain restrictions on the data format, such

 
{
"Rows ":[], "Total ":0
}

We need to put the data to be displayed in rows (in the form of an array) and put the number of records in total

The names of rows and total fields are not fixed. You can modify the parameters:

Root: 'rows ', // Data Source Field name
Record: 'Total', // data source record number field name

Use Remote Data Sorting

When sorting data is loaded for the first time, the system determines whether the sortname parameter is set. If so, the system will transmit the sorting information to the server:

String sortname = context. request ["sortname"];
String sortorder = context. request ["sortorder"];

When we click the header, it is also possible to trigger the server sorting operation:

We usually specify the default sorting field, such as sortname: 'orderid ':

The parameter names of sortname and sortorder can be changed:

Use Remote Data Paging

Liger grid comes with pagination. If local data is used, pagination is unnecessary. However, if remote data loading is used, you need to perform this paging operation on your own, return the corresponding data based on the paging information.

The component transmits several useful paging parameters to the server:

The server performs paging based on these two parameters:

 
String _ pagenumber=Context. Request["Page"];
String _ pagesize=Context. Request["Pagesize"];

We need to return a string in JSON format:

If you have any questions, refer:

Jquery ligerui table ligergrid combines ASP. net mvc to display data

Jquery liger UI ligergrid creates a general paging sorting query table (for download)

Or go to the Forum to ask:

Http://bbs.ligerui.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.