I have a RadGrid in batch edit mode, cell edit. I'm using the events 'OnBatchEditOpened' to manipulate some of the UI before the user gets to see/use it and then 'BatchEditCellValueChanged' to run further logic.
I have a pair of cells in the grid, in column X, that need to be the opposite of each other's selections in the rad comboBox I'm using in the editor. If one cell has optionA selected in row A then the other cell needs to show optionB in row B. The issue I'm running into is that to change cell values I have been using this method:
This works fine...normally when I'm updating values in some OTHER grid. But when I run this logic from the 'BatchEditCellValueChanged' method of the SAME GRID then the grid gets a bit wonky. I already have code to avoid recursive looping. The problem is that the grid has a set of functions that are fired in a set sequence, like opening, opened, changing, changed, closing, closed, etc. When you cause that data flow to step INTO itself before the first is finished... it winds up leaving the edit control visible in the starting cell.
So - CellA opens in editor, I select the radComboBox option A and tab out of the cell. This causes Telerik's event chain to start firing... it gets to 'BatchEditCellValueChanged' and runs my code. My code then tell the SAME grid to update CellB in the other row... and that starts the grid's event chain to START OVER... before CellA's 'value changed' event is finished. I think this is what is causing the logic issues and is making the editor, i.e. the radComboBox in CellA, to remain visible even after I exit the cell.
So - all that being said. What is the 'correct' way to change cellB's in row B when cellA's value changes in rowA of the same batch edit grid?