We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. For help or questions on migrating your codebase to the xamDataGrid, please contact support.
This topic describes how to use the SelectAll method which is added the RowCollection. The SelectAll method can be used to do the following:
Select all the rows on the root level of the xamGrid control
Select all the rows for a particular child band
Select all the rows for a particular grouping
You need to first read the following topics:
This procedure explains how to select the rows in the xamGrid control. The method is added to the RowsCollection and can be used to:
Select all rows on the root level of xamGrid
Select all rows for a particular child band
Select all rows for a particular grouping
Calling the SelectAll method raises the SelectedRowsCollectionChanged event.
Following is a preview of the final result.
The screenshot below displays the xamGrid control with all the rows on the root level selected.
The following screenshot displays the xamGrid with the rows for a particular child band selected.
The following screenshot displays the xamGrid with the rows for a particular grouping selected.
To complete the procedure, you need the following:
A xamGrid control bound to hierarchical data
GroupBy enabled
Following is a conceptual overview of the process:
Select All Rows on the Root Level of the xamGrid Control
Select All Rows for a Particular Child Band
Select All Rows for a Particular Grouping
Select all rows on the root level of the xamGrid Control.
This is done by calling the SelectAll method on the Rows of xamGrid.
In C#:
dataGrid.Rows.SelectAll();
In Visual Basic:
dataGrid.Rows.SelectAll()
Select all rows for a particular child band.
This is done by calling the SelectAll method on the Rows of a particular child band.
In C#:
dataGrid.Rows[0].ChildBands[0].Rows.SelectAll();
In Visual Basic:
dataGrid.Rows(0).ChildBands(0).Rows.SelectAll()
Select all rows for a particular grouping
This is done by calling the SelectAll method on the Rows of a particular grouping.
In C#:
((GroupByRow)dataGrid.Rows[0]).Rows.SelectAll();
In Visual Basic:
CType(dataGrid.Rows(0),GroupByRow).Rows.SelectAll()