CommitMode
Description
A CommitMode
is an enum that specifies when the validation will occur and when the valid values will be committed to the grid’s data source.
The default DataGridOptions
.commitMode
is Cell
, which means the validation process (if any) and commit to the data source will take place once the edited dataCell
loses focus or the “Enter” key is pressed.
Possible Values
Name |
Type |
Value |
Description |
---|---|---|---|
Cell |
string |
“cell” |
The edited values will be validated and committed to the data source when the edited cell loses the focus or the “Enter” key is pressed, to end edit mode. |
Row |
string |
“row” |
The edited values will be validated and committed to the data source when the edited row loses the focus. |
Example
In this example, the DataGridOptions
.commitMode
is set to Row
, meaning the validation process (if any) and commit to the data source will take place once the edited dataRow
loses focus.
const options = {
allowEdit: true,
commitMode: Xceed.CommitMode.Row
}
};
const datagrid = new Xceed.DataGrid("containerId", options);