The Edit
module is used to handle editing actions.
To adds a new row at the top with the given data. When data is not passed, it will add empty rows.
editSettings.allowEditing
should be true.
Parameter | Type | Description |
---|---|---|
data (optional) | Object |
Defines the new add record data. |
index (optional) | number |
Defines the row index to be added |
Returns void
Resets added, edited, and deleted records in the batch mode.
Returns void
Bulk saves added, edited, and deleted records in the batch mode.
Returns void
Cancels edited state.
Returns void
Deletes a record with the given options. If fieldname and data are not given, the Grid will delete the selected record.
editSettings.allowDeleting
should be true.
Parameter | Type | Description |
---|---|---|
fieldname (optional) | string |
Defines the primary key field name of the column. |
data (optional) | Object |
Defines the JSON data record to be deleted. |
Returns void
Deletes a visible row by TR element.
Parameter | Type | Description |
---|---|---|
tr | HTMLTableRowElement |
Defines the table row element. |
Returns void
Changes a particular cell into edited state based on the row index and field name provided in the batch
mode.
Parameter | Type | Description |
---|---|---|
index | number |
Defines row index to edit a particular cell. |
field | string |
Defines the field name of the column to perform batch edit. |
Returns void
Checks the status of validation at the time of editing. If validation is passed, it returns true.
Returns boolean
If Grid is in editable state, you can save a record by invoking endEdit.
Returns void
Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.
Returns Object
Gets the current value of the edited component.
Returns Object
Saves the cell that is currently edited. It does not save the value to the DataSource.
Returns void
Edits any bound record in the Grid by TR element.
Parameter | Type | Description |
---|---|---|
tr (optional) | HTMLTableRowElement |
Defines the table row to be edited. |
Returns void
To update the specified cell by given value without changing into edited state.
Parameter | Type | Description |
---|---|---|
rowIndex | number |
Defines the row index. |
field | string |
Defines the column field. |
value | string | number | boolean | Date |
Defines the value to be changed. |
Returns void
To update the specified row by given values without changing into edited state.
Parameter | Type | Description |
---|---|---|
index | number |
Defines the row index. |
data | Object |
Defines the data object to be updated. |
Returns void