I can successfully collapse the ID field in the xamdatagrid below, despite having it autogenerate the fields like this:
However it only collapses it in the main rows, all nested (hierarchical) rows are unaffected, how do I make sure their ID field is also collapsed please?
<igDP:XamDataGrid x:Name="xamDataGridOutput" DataSource="{Binding VariableDataSource}" Theme ="Aero"><igDP:XamDataGrid.FieldLayoutSettings><igDP:FieldLayoutSettings AutoGenerateFields="True"/></igDP:XamDataGrid.FieldLayoutSettings><igDP:XamDataGrid.FieldLayouts><igDP:FieldLayout><igDP:FieldLayout.Fields><igDP:Field Name="ID" Label="ID" Visibility="Collapsed"/></igDP:FieldLayout.Fields></igDP:FieldLayout></igDP:XamDataGrid.FieldLayouts></igDP:XamDataGrid>
Mnay Thanks Alex. Works great!
Hello,
A quick way to always collapse a Field that has a name of "ID" is to handle the FieldLayoutInitialized event of the XamDataGrid and check if the currently initialized layout has a field that has an "ID" name (check the Fields collection - e.FieldLayout.Fields) and collapse it.