Problems with the DataGrid default paging in Easyui

Source: Internet
Author: User

It was found that the data was loaded two times after the Data-options was written directly on the table, and then placed in $ ();

 Additionally, the default paging Pageszie is set.
1 $ (function () {2     //Add tip to the stars when you're done loading3$("#dg"). DataGrid ({4Rownumbers:true,5Url:'datagrid_data1.aspx',6Method'Get',7Fittrue,8Striped:true,9Pagination:true,                    Ten onloadsuccess:function (data) { One Addtipforstar (); A         } -     }); -  the     varp = $ ('#dg'). DataGrid ('Getpager'); - $ (P). Pagination ({ -PageSize: the,//number of records displayed per page, default is ten -PageList: [ the, -, $],//you can set a list of the number of record bars per page +Beforepagetext:'Section',//Chinese characters displayed in front of page text box -Afterpagetext:'page Total {pages} page', +Displaymsg:'The current display {from}-{to} records a total of {all} records' A     }); at});

 

See the first load of default pagesize or 10 via Firefox. Change it to this.

1 $ (function () {2     //Add tip to the stars when you're done loading3$("#dg"). DataGrid ({4Rownumbers:true,5Url:'datagrid_data1.aspx',6Method'Get',7Fittrue,8Striped:true,9Pagination:true,   TenPageSize: the,//number of records displayed per page, default is ten OnePageList: [ the, -, $],//you can set a list of the number of record bars per page A onloadsuccess:function (data) { - Addtipforstar (); -         } the     }); -  -     varp = $ ('#dg'). DataGrid ('Getpager'); - $ (P). Pagination ({ +Beforepagetext:'Section',//Chinese characters displayed in front of page text box -Afterpagetext:'page Total {pages} page', +Displaymsg:'The current display {from}-{to} records a total of {all} records' A     }); at});

Data binding is also written in the data-options of th.

Problems with the DataGrid default paging in Easyui

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.