I have a XamDataGrid with table data giving a master detail relationship.
Fields: Name, Retention Time, Signals => detail
Fields: Integral, Volume, Concentration…
Now the field integral can have different units thus the header must vary accordingly. As the signals are loaded dynamically and even the user can specify his own type of signals, the header label needs to be created on the fly for each record differently.
How can this be done?
I recommend reviewing the following blog on how to use the FieldLayoutInitialized event to add fields dynamically.
Let me know if you have any questions.
this blog has nothing in common with my question.
I was asking for varying headers of child records. The field names are static the headers(Field.Labels) have to be dynamic.
You can try using a LabelPresenterStyle. I attached an example below. Let me know if you have any questions.
This example only works for the top level of the data structure but not for a detail dataset.
How can the "DataItem" of the detail set be accessed from the field properties?
Do you mean child fields in a hierarchy?