I have a hierarchical data grid bound to a dataset that defines a relationship between Customers and Orders (1 to many). The grid displays customer rows, and each customer row can be expanded to show orders. In this scenario, how can I customize the "nested" grid that appears when a customer row is expanded to show order info? This is a simple prototype, so the only customizations I'm looking for are showing/hiding columns, column width, & edit/readonly.
Thanks in advance!
Wire up the FieldLayoutInitialized event. The FieldLayout is passed in and you can modify the Field settings there.
Thanks Joe. Is there any way to configure the settings of the nested grid in the XAML?
Also, i'm having a bit of trouble setting these properties in code when I handle the FieldLayoutInitialized event. I'm trying to use:
e.FieldLayout.Field but the properties (ex AllowEditResolved) are read only. If I set the properties in e.FieldLayout.FieldSettings.AllowEdit, it applies to all my fields. How can I set these properties programatically for each column individually?
The syntax is:
e.FieldLayout.Fields[x].Settings.AllowEdit = True
You rock Joe, very helpful! Now I can chose between your code or XAML approach.
Cheers!