ComponentOne Grid for WPF: Grid for WPF Task-Based Help > Customizing the Grid's Appearance > Hiding Child Tables

Hiding Child Tables

If you choose, you can prevent the grid from displaying hierarchical child data tables. For information about hierarchical data views, see Setting Up Hierarchical Data Views. By default the AllowHierarchicalData property is set to True and child tables are visible in the grid when the grid is automatically generated (AutoGenerateColumns is True). For details, see Viewing Child Tables. By setting the AllowHierarchicalData property to False, you can prevent child tables from being displayed.

In XAML

Prevent child grids from being displayed by adding AllowHierarchicalData="False"  to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" AllowHierarchicalData="False"/>

In Code

Prevent users from scrolling the grid at run time by adding the following code to your project:

      Visual Basic

C1DataGrid1.AllowHierarchicalData = False

      C#

c1DataGrid1.AllowHierarchicalData = false;


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.