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
405
validate new row content
posted

Hi,

    I have a grid with fixed new row at the top (using AddNewRowDefault option). I want to validate the data after the data has been entered and before new row gets created when user presses tab on the last cell (user may optionally paste the whole row from excel and press tab). I tried to use BeforeRowInsert event handler, but the values are not available in this event handler. then I tried BeforeRowUpdate. values are available in this event handler, but this is too late, a blank row is already added and the data in the fixed row disappears and user can't see the invalid data.

Is there anyway I can stop the new row getting inserted if the validation fails (the data should not disappear in the fixed row) and also stop a row from getting updated with invalid data as well. I don't want to do validation at cell level. I want to throw one message for all invalid row data before row gets inserted and also before it is updated. Please let me know how to do this.

thanks,

Rama