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
630
iterate sibling child rows or sibling parent rows in CellValueChanging (to prohibit the user to enter same value 2 times in a column and save it on postback)
posted

Hi,

In the event CellValueChanging (EditingCore EditingClientEvents-CellValueChanging and EditingClientEvents CellValueChanging), I want to verify if the user is entering a value that is already in the same column of the same group of child rows (child rows Under the same parent wor) or the parents rows, depending if he is changing the value for a child row or a parent row. If the value already exist, i want to cancel the CellValueChanging event (i already do it for other reasons in the same event, for example if value >= 900). This works already for any other validations when the user enters a value in an existing row or a new row as parent row or child row (i didn't have to iterate the other rows yet). I just can't iterate the throught the rows of the same group of rows and get the other values of the column to compare them with the value the user has just entered in the cell. Is there a way to do it and cancel the event (or at least not add this value in the grid because it can be saved in the database on postback)?

Thank you.