I haven't found any satisfactory answer or solution to my problem. I have a master - detail grid (2 levels only), single selection only. Some relevant code:
<dxg:GridControl AutoGenerateColumns="None" Name="gridControlMaster" AutoExpandAllGroups="True">
<dxg:GridControl.View>
<dxg:TableView ShowGroupPanel="False" />
</dxg:GridControl.View>
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Entry.Date" Header="Entry date" Visible="True" AllowEditing="False" />
</dxg:GridControl.Columns>
<dxg:GridControl.DetailDescriptor>
<dxg:DataControlDetailDescriptor ItemsSourcePath="EntrySubList" ShowHeader="False">
<dxg:DataControlDetailDescriptor.DataControl>
<dxg:GridControl AutoGenerateColumns="None" AutoExpandAllGroups="True">
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" ShowColumnHeaders="False" />
</dxg:GridControl.View>
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Label" Header="Label" Visible="True" AllowEditing="False" />
<dxg:GridColumn FieldName="Value" Header="Value" Visible="True" AllowEditing="False" />
</dxg:GridControl.Columns>
</dxg:GridControl>
</dxg:DataControlDetailDescriptor.DataControl>
</dxg:DataControlDetailDescriptor>
</dxg:GridControl.DetailDescriptor>
</dxg:GridControl>
At some point (say some button click outside the GridControl) I need the currently selected item of the master grid, regardless of the selected sub-item in the detail grid! Currently, if I click some row in the master grid and then some row in the detail grid (having some other parent than previously selected row in master grid), the CurrentItem or SelectedItem is not the desired one (it is the last selected item of the master grid, when it should be at least the parent of currently highlited detail item). This can be misleading for user.
The ideal solution would be having some kind of "selection unit", in my case being the whole master item, together with all of the children items (in detail grid). So, on whichever item in grid user clicks, master or detail, the master item and all of its children are selected (highlited). CurrentItem of the master grid is the currently selected parent item.
Another possible solution would be to only allow selecting the master grid items - and to prevent selection in detail grid (only setting SelectionMode = none on detail GridControl doesn't do that!). Another good feature in this case would be that clicking on child item (trying to select it) selects its parent in master grid.
If any further information is needed, I will provide it.
Thank you for the answer.