![xamTreeGrid 05.png](images/xamTreeGrid_05.png)
This topic explains how to configure the selection behavior for child level records.
The following topics are prerequisites to understanding this topic:
The xamTreeGrid control allows you to configure (via property) which records are selected in response to a user selecting a range of records or cells. The three cases below have the same initial state:
No initial selection
The "Documents" record is expanded
The "Users" record is collapsed
The user performs cross-level selection by clicking on the "Boot" record selector and then shift-clicks on the "Windows" record selector
After the selection is done the user expands the "Users" record
In this case no nested records are selected regardless of the expanded state of their parent record. Only records on the current selection level are selected. This is the default setting for GridView.
In this case all visible records between the pivot record and the end selection record are selected. The records under the "Users" record were not selected because they became visible after the selection was made. This is the default setting for TreeView.
In this case all records (at the selection level and all nested levels) were selected regardless of the expanded state of their parent.
The following table explains briefly the configurable aspect of the xamTreeGrid control and maps it to the property that configure it.
The following code example show how to set the cross-level depth selection mode to "VisibleOnly".
In XAML:
<igDP:XamTreeGrid>
<igDP:XamTreeGrid.ViewSettings>
<igDP:TreeViewSettings SelectionDepthMode="VisibleOnly" />
</igDP:XamTreeGrid.ViewSettings>
</igDP:XamTreeGrid>
The following topics provide additional information related to this topic.