Is there any way to retrieve a specific cell's editor from a record in XamDataGrid from codebehind? Apart from in the XamDataGrid's EditMode events?
Hello,
You can get the editor from a cell if you have the CellValuePresenter. The way to do this would be using the static method FromCell or FromRecordAndField in the CellValuePresenter class. The code will be similar to this:
However, the time at which these presenters are created is very late in the window lifecycle. You will want to use a very late event off of the page called ContentRendered if you want to take a look at the editors on the initial window load.
However, if you want to get at the editors after the window has already loaded, just use the code above. Remember, you will have to loop through the records to get all the Editors.
Hope this helps!
That's fantastic! Thanks very much for the explanation. Makes things a whole lot easier than the workaround I was using.