...
Cell Click event
Code Block language js CWEH.registerHandler('BENE_WGT', CWEC.CELL_CLICK, function(columnId, value, record) { LOGGER.info('The CELL_CLICK click event is triggered', [columnId, value, record]); }); // Here, 'BENE_WGT' is the widget ID.
Row Click event
Code Block language js CWEH.registerHandler('BENE_WGT', CWEC.ROW_CLICK, function(columnId, record, value) { LOGGER.info('firedThe ROW_CLICK event is triggered.', [columnId, record, value]); }); // Here, 'BENE_WGT' is the widget ID.
...
The Row Double Click event occurs when a row is clicked twice.
Note |
---|
For the Cell Double Click and the Row Double Click events to function, the attribute data-single-click = "true" must be defined. As we are configuring the template for a column, we need to define the attribute data-column-id = '<Column ID>' as well. |
For example, when you double click a textbox on the Reference Number column of the Beneficiary Details widget, the Cell Double Click event is raised.
To achieve this, you need to define the Cell Double Click event attributes in the Column Template as follows:
Code Block | ||
---|---|---|
| ||
<input
type = "text"
data-single-click = "true"
value = {{ BENE_ID }}
data-column-id = "BENE_ID"
> |
On a Cell Double Click, the column ID is returned followed by the template configuration (value) and the row details. On a Row Double Click the column ID is returned followed by the row details and the template configuration (value) as shown in the following image:
To capture actions through the Cell Double Click and Row Double Click events, use the event handler functions. For the Reference Number column, you need to capture the actions as follows:
Cell Double Click event
Code Block language js CWEH.registerHandler('BENE_WGT', CWEC.CELL_DBLCLICK, function(columnId, value, record) { LOGGER.info('The CELL_DBLCLICK event is triggered.', [columnId, value, record]); }); // Here, 'BENE_WGT' is the widget ID.
Row Double Click event
Code Block language js CWEH.registerHandler('BENE_WGT', CWEC.ROW_DBLCLICK, function(columnId, record, value) { LOGGER.info('The ROW_DBLCLICK event is triggered.', [columnId, record, value]); }); // Here, 'BENE_WGT' is the widget ID.