Easyui the checkbox properties and events in the DataGrid

Source: Internet
Author: User

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

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.