Hi,
how can I get the Row-Object from the underlying data object?
In my case, I have to select a specific row but I don't have the associated row object.
Thank you,
Stefan
Hello Stefan,
XamGrid uses Virtualization. If you have the data collection and the XamGrid's row collection, all shown on the screen, you can search for a specific row. If you use Paging or Filtering is different scenario - not all the rows will be available, so if you want to select a row it might not be visible and you will get NullReferenceException.
In your scenario I will suggest get the rows of the XamGrid, that it currently has, look for the one you want to select and select it only if it is available.
If you have additional questions concerning this matter, please let me know.
Thank you for your answer,
but I need to explain my problem a little bit more:At first, I forgot to say, that I need to do this by code (MVVM project).
So, I want to add a specific row to the SelectedRowsCollection, that this row becomes selected.But I only have the data-object that is bound to a row through the ItemsSource property.Therefor, I need a way to find the row, that represents this object (Not visually).
Regards