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!