Skip to main content

TileView.GetChildRowCount(Int32) Method

Returns the number of tiles in the group with the specified unique identifier.

Namespace: DevExpress.XtraGrid.Views.Tile

Assembly: DevExpress.XtraGrid.v23.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

public int GetChildRowCount(
    int rowHandle
)

Parameters

Name Type Description
rowHandle Int32

An integer value that specifies a unique identifier of the group for which to return the number of child tiles.

Returns

Type Description
Int32

An integer value that specifies the number of tiles in the group with the specified rowHandle.

Remarks

If tiles are grouped using the TileViewColumns.GroupColumn property of the TileView.ColumnSet collection, you can use the TileView.GetParentRowHandle, TileView.GetChildRowHandle, GetChildRowCount and TileView.IsGroupRow methods to operate tiles based on tile handles and groups.

See the Rows topic for more information on tile handles and the Data Grouping section in the Tile View topic for details on the grouping feature.

Example

The following example shows how to get a handle for the group to which a particular tile belongs, and iterate visible tiles in this group.

// Get a handle of the group to which a particular tile belongs (tile with the 0 handle in this example).
int groupHandle = tileView1.GetParentRowHandle(0);
// Check whether a handle corresponds to a group of tiles.
if (tileView1.IsGroupRow(groupHandle)) {
    // Get the number of tiles in the group.
    int groupTileCount = tileView1.GetChildRowCount(groupHandle);
    for (int i = 0; i < groupTileCount; i++) {
        // Get a handle for the tile  with the current index in the group.
        int childRowHandle = tileView1.GetChildRowHandle(groupHandle, i);
        // Check whether the tile is visible.
        if (tileView1.IsTileVisible(childRowHandle) == DevExpress.XtraGrid.Views.Grid.RowVisibleState.Visible) {
            // Get an underlying data object (DataRowView in this case), and perform the required actions.
            var row = tileView1.GetRow(childRowHandle) as System.Data.DataRowView;
            // ...
        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetChildRowCount(Int32) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also