DataGrid where with the selection, tick related
DataGrid Properties:
Singleselect Boolean true to allow only one row to be selected. False
Ctrlselect Boolean allows multiple selection with CTRL + mouse click when multi-line selection is enabled. (This property is available from version 1.3.6)
Checkonselect Boolean If True, the check box is selected or unchecked when the user taps the line. If False, the user will only select or Cancel when the check box is clicked. (This property is available from version 1.3) True
Selectoncheck Boolean If true, clicking the check box will always select the row. If False, select the row to uncheck the check box. (This property is available from version 1.3)
The DataGrid column is an array object, which is also an array object. The element inside the element array is a configuration object that defines each column field.
CheckBox Boolean If True, the check box is displayed. The check box column has a fixed width.
DataGrid Event
OnSelect RowIndex, RowData is triggered when the user selects a row, parameters include: RowIndex: The index value of the selected row, and the index starts at 0. RowData: The record that corresponds to the selected row.
Onunselect RowIndex, RowData triggers when the user cancels a row, parameters include: RowIndex: The index value of the selected row, and the index starts at 0. RowData: Corresponds to a record that cancels the selection of rows.
Onselectall rows is triggered when the user selects all rows.
Onunselectall rows is triggered when the user cancels all rows.
OnCheck Rowindex,rowdata is triggered when the user checks a line, the parameters include: RowIndex: The selected row index, the index starts at 0. RowData: The record that corresponds to the selected row. (This event has been available since version 1.3)
Onuncheck Rowindex,rowdata is triggered when the user uncheck a line, the parameters include: RowIndex: The selected row index, the index starts at 0. RowData: Corresponds to the record of the unchecked row. (This event has been available since version 1.3)
Oncheckall rows is triggered when the user ticks all rows. (This event has been available since version 1.3)
Onuncheckall rows is triggered when the user cancels the tick of all rows. (This event has been available since version 1.3)
Method
getchecked None returns all rows when the check box is selected. (This method has been available since version 1.3)
getselected None returns the first selected row or null if no row is selected.
Getselections None returns all selected rows and returns an empty array when no record is selected.
Clearselections None clears all the selected rows.
clearchecked None clears all the ticked lines. (This method is available from version 1.3.2)
SelectAll None selects all rows in the current page.
Unselectall None deselect all rows in the current page.
SelectRow Index selects a row, and the row index starts at 0.
Selectrecord Idvalue selects a row by the ID value parameter.
Unselectrow index cancels the selection of a row.
Checkall None tick all rows in the current page. (This method has been available since version 1.3)
Uncheckall None uncheck all rows in the current page. (This method has been available since version 1.3)
Checkrow index tick one row, and the row index starts at 0. (This method has been available since version 1.3)
Uncheckrow index uncheck one row and the row index starts at 0. (This method has been available since version 1.3)
Easyui the checkbox properties and events in the DataGrid