I would like to validate column value on iggtree grid JavaScript ( for example max length limit) when we click on inline "Add new row" button using igtree grid
Hello Siva,
Thank you for contacting Infragistics.
In order to validate data from cells when updating or adding new row you can use editCellEnding or editRowEnding event regarding what editMode is selected(If none is selected the default is row). These events can be canceled which would lead to not changing the value inside the cell and cell/row staying in edit mode.
For example if you want the value of the column “Name” to not be more than 10 symbols and you are using editMode: “cell”, you can use:
features : [ { name : "Updating", editMode: "cell", editCellEnding: function(evt, ui) { if(ui.rowAdding && ui.columnKey === "Name" && ui.value.length > 10) { // Write logic when value for Name column is too big and is in adding mode, and finally cancel the event return false; } } } ]
In case you have any additional questions feel free to ask them.