jquery-easyui DataGrid in checkbox multiple selection, row selection does not correspond to remove the highlight of the solution
When working with a multi-select feature, Easyui-datagrid does not allow a row to be selected when handling a cell's click event.
For example, when you click "View", just to see the details, you do not need to select rows.
To complete this requirement, you only need to set the DataGrid's Checkonselect property to False.
However, when this property is set, the new problem comes up.
The current approach is to use the following code to remove the highlight: (originally intended to be processed into a checkbox selected row highlighting, but just start using easyui not enough)
Onselect:function (RowIndex, RowData) {$ (' #datagrid2 '). DataGrid (' Unselectrow ', rowIndex);},oncheckall:function ( rows) {$ (' #datagrid2 '). DataGrid (' Unselectall ');}
After using the above code, to obtain the row data that is selected by the checkbox, use the following code:
var CheckedItems = $ (' #datagrid2 '). DataGrid (' getchecked ');
Starting with this line of code has always returned only one row of data, and then carefully looked at the next, this line of code use is also a prerequisite, that is, you must specify IDfield.
If you think of a way to do this, the checkbox is highlighted and will continue to be added.
Jquery-easyui DataGrid in checkbox multiple selection, row selection does not correspond to remove the highlight of the solution