control.selectRecord()
- Last UpdatedJun 25, 2024
- 1 minute read
Use selectRecord() method to select a specific record from the On Data Bound event of the Data Grid.
Syntax
control.selectRecord(e,recordNumber);
Parameters
|
Parameter |
Description |
|---|---|
|
e |
Constant for events triggered in the data grid such as paging, filtering, sorting, and so on. |
|
recordNumber |
Specifies the record number of the record in the data grid to be selected. |
Return Value
None.
Example
// Select the second record in the Data Grid.
control.selectRecord(e,2);
Note:
- In the Data Grid control, the Select First Record property takes precedence over the script to select a record in the On Data Bound event.
- For example, in a Data Grid control when the Select First Record property is set to Yes and a script in the On Data Bound event is set to select the second record, the first record is selected.
- Therefore, selectRecord() method and the Select First Record property must not be used together.