When a XamDataGrid's root table is expanded, it may yield multiple child tables. Is there a way to show multiple root tables OR is there a way to have a hidden root table with multiple child tables that are presented to an end-user as root tables?
Thanks.
Ok I figured this out. To simulate multiple roots with a DataSet, make a dummy root table with one field that is used as a key to any immediate child tables. Next, set the datasource to that dummy root table. In XAML, modify the FieldSettings of that field added to the dummy root table. The modifications should be like so:
Lastly, in the XamDataGrid's InitializeRecord event, the root record has to be detected when it's initially displayed; after which, it has to be expanded and it's expansion indicator rendered invisible:
<igDP:Field Name="ComponentType" Label="Component Type" Visibility="Hidden">
<igDP:Field.Settings>
<igDP:FieldSettings CellMinWidth="0" CellMaxWidth="0" CellWidth="0" CellMinHeight="0" CellMaxHeight="0" CellHeight="0" />
</igDP:Field.Settings>
</igDP:Field>
// Ensure the root record has an invisible expansion indicator and is automatically expanded.
{
e.Record.IsEnabled =
false;
// To prevent automation accidents.
e.Record.ExpansionIndicatorVisibility =
Visibility.Hidden;
e.Record.IsExpanded =
true;
}
That's it! Thanks.