Implementation of cross-page check of datagrid in easyui, easyuidatagrid

Source: Internet
Author: User

Implementation of cross-page check of datagrid in easyui, easyuidatagrid

Easyui's datagrid displays data by page. If you need to check multiple data entries and not on the same page, Will easyui Save the selected data on other pages?

At first, I checked it online. Some people said that easyui does not have this method and needs to be written by myself. But in fact, after version 1.4, I only need to add idField: 'id' TO THE datagrid ', for each data id attribute, easyui retains the previously selected information by default. If there is no id, the information previously selected is not displayed after the page is changed. Therefore, the network is a good thing, but you must have the ability to distinguish!

The following is some code:

$ WeldingBomInstanceGrid = $ ("# weldingBomInstanceGrid "). datagrid ({striped: true, rownumbers: true, nowrap: false, multiSort: true, singleSelect: true, selectOnCheck: false, checkOnSelect: false, remoteSort: false, fit: true, pagination: true, pageSize: 20, toolbar: '# selectDiv', <span style = "color: # ff0000;"> idField: 'id', </span> pageList: [100,150,200,], url: 'weldingbominstanceaction! List. act ', queryParams: {"bopTmDataSet. id ": '$ {bopTmDataSet. id} '}, // upload the Project ID to onBeforeLoad: function () {}, rowStyler: function (index, row) {}, columns: [[<span style = "color: # ff0000;"> {field: '_ checkbox', checkbox: true, hidden: false}, </span> {field: 'id', title: "id", width: 100, hidden: true },

The above section describes the cross-page selection of the datagrid in easyui. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.