Editing and Validating Table Cells
All array data can be made editable in a table.
Achieve this by:
- selecting the table column in the View Designer and selecting the Editable checkbox.
- opening the code editor and adding the attribute editable="true" to the <vdl-table-column>.
The input control type can be changed using the
editor-type attribute. A list of select options is displayed either by:
- Adding the editor-options attribute and supplying an expression that provides the options.
editor-options="=[1,2,3,4,5]
- Adding the editor-options-set attribute and specifying a set entity name to provide the options.
FracVal:[1 2 3 4 5 6 7 8 9 ]
declarations ... !@insight.manage input !@insight.alias mySelector FracVal: set of integer ... end-declarations
Code editor<vdl-table> <vdl-table-column entity="Shares_Return" editable="true" editor type="select" editor-options-set="FracVal"></vdl-table-column> <vdl-table-column entity="Shares_fraction"></vdl-table-column> </vdl-table>
Validation is applied across all editable cells in a table. The standard, built-in validation checks that the input value is of the same data type as the underlying model entity, but it is also possible to supply custom validators for table columns.
Validation is applied as you type or select a value. When a value becomes invalid, the cell is highlighted. If you try to save an invalid value, a message dialog will present the validation failure message. See Using Validators for more information.