Home › Forums › WPF controls › Xceed DataGrid for WPF › How to programmatically set GlobalSelectedItem?
Is there a way from C# to set an object 4 Relations deep as the currently selected item in the DataGridControl?
Imported from legacy forums. Posted by MiddleTommy (had 571 views)
The only way to do that would be to have access to the DataGridContext for the object 4 relations deep and add the object to its DataGridContext`s SelectedItems collection.
Because DataGridContext instances exist only for “expanded” details, it would be impossible to do that if the details are not expanded.
If the details are indeed expanded, then you can use the DataGridContext/DataGridControl.GetChildContext() method.
Imported from legacy forums. Posted by Marcus [Xceed] (had 2003 views)