[]
        
(Showing Draft Content)

C1.WPF.FlexGrid.C1FlexGrid.ChildItemsPath

ChildItemsPath Property

ChildItemsPath

Gets or sets the name of the property used to generate child rows.

Declaration
public string ChildItemsPath { get; set; }
Remarks
<p>This property allows you to use the FlexGrid as a bound <b>TreeView</b>.</p>
<p>To use it, the data source must contain items that have properties which are 

collections of the same type.

Examples
<p>For example, assuming you have a Person class with a Children property that 

contains a list of Person objects, and you want to display the data as a tree.

You could accomplish that using the following XAML:

<pre><code class="lang-csharp"><c1:C1FlexGrid 
    AutoGenerateColumns="False" 
    ChildItemsPath="Children" >
    <c1:C1FlexGrid.Columns>
        <c1:Column Header="Name" Binding="{Binding Name}" Width="*" />
        <c1:Column Header="Children" Binding="{Binding Children.Count}" />
    </c1:C1FlexGrid.Columns>
</c1:C1FlexGrid></code></pre>
<p>To display the data as a tree, the grid creates <xref href="C1.WPF.FlexGrid.GroupRow" data-throw-if-not-resolved="false"></xref> 

objects for every item in the collection.