Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
igtree grid column validation on add new row

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

No Data
  • 200
    Offline posted

    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.

No Data