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.
Hello Danjut,
The snippet I've provided works for adding new rows also.
Let me know if you need further assistance.
Because i'm kinda out-of-time, i just tested your solution and it works for all my needs, just as you said. I didn't took time to test my colleague's solution so if anyone has some time to test it (not tested for new added rows by my colleague), please tell us if it works. Thank you everyone!
Looking forward for hearing from you.
My colleague found that the Owner property returns the GridView/RowIsland also. So i'll test his information and your answer. Thank you very much. Here is my colleague example to know how many rows are in my current row's gridView:
eventArgs.get_cell().get_row()._get_owner().get_rows().get_length()
Hello danjut,
The code that Denis has shared should iterate through the rows in the same RowIsland that the cell you are trying to edit is.
I believe that this would be sufficient for your needs.
Do you need any other assistance?