Version

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. For help or questions on migrating your codebase to the XamDataGrid, please contact support.

Select All xamGrid Rows in Groups, Bands and at the Root

Topic Overview

Purpose

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

Required background

You need to first read the following topics:

Selecting Rows in the Grid

Introduction

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.

Preview

Following is a preview of the final result.

The screenshot below displays the xamGrid control with all the rows on the root level selected.

Select All xamGrid Rows in Groups Bands and at the Root 01.png

The following screenshot displays the xamGrid with the rows for a particular child band selected.

Select All xamGrid Rows in Groups Bands and at the Root 02.png

The following screenshot displays the xamGrid with the rows for a particular grouping selected.

Select All xamGrid Rows in Groups Bands and at the Root 03.png

Requirements

To complete the procedure, you need the following:

  • A xamGrid control bound to hierarchical data

  • GroupBy enabled

Overview

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

Steps

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.

Note
Note

The ChildBands property is not supported for a GroupByRow object. This collection property returns null in this particular case.

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()

Following are some other topics you may find useful.