Cell Editing in Advanced Grids
You can edit cells using the IsEditable and EnableEditButtons properties and the methods described in the list that follows.
|
You can set only one property at a time for cell editing.
|
• IsEditable—Cell editing is available for all supporting renderers by setting the IsEditable property to true in the Mashup Builder configuration or through JSON configuration. When you set IsEditable, the EditedTable property becomes available to bind the changed rows to a service. If you set these two properties, the grid is in edit mode by default and no edit buttons are available. You can use your own mashup edit buttons to put the grid in edit mode by binding the click events to a service, which would switch on or off edit mode.
When you set the IsEditable property, the following events are available:
◦ EditCellStarted—Triggers when you click on a cell to start editing.
◦ EditCellCompleted—Triggers when you edit a cell and press ENTER, press TAB, or click outside of the cell
• EnableEditButtons—You can set the EnableEditButtons property instead of the IsEditable property. If you set this property to true, a set of edit toolbar buttons appear in the grid. You can position these buttons with the EditButtonsLocation settings to top left or right or bottom left or right. The end user can then save the edits by clicking Edit followed by Save or Cancel.
The following image shows the edit buttons on the top right area of the widget.
When you enable the EnableEditButtons property, the following events are available:
• EditStarted—Triggers you click Edit to start editing.
• EditCompleted—Triggers when you click Save.
• EditCancelled—Triggers when you click Cancel.
Edits are done per cell by clicking on the cell to see the raw unformatted value. A cell editor appears in which you can make changes. The cell renderer is applied to format the value in its display format.
|
Press ESC to leave the cell unchanged with its original value.
|