Hello,
im using XamDataGrid hierachical through binding its DataSource to a hierachical DataSet, and provide they FieldLayout + RelationField for each FieldLayout/Table, dynamically. (I generate the grid all code-behind, no xaml. (Dynamic relations & columns.))
I dont want the relation headers "relation6" / "relation7" / ..
My problem is, i add multiple child-relations for a table - used by different rows. The grid now displays every relation for every row, even if its empty for this row. How should i provide the relations? Or Hide the relation-groups/headers? (hide relation field?)
GreetingsiA. Kits
There is mention of those properties here but if I were to read that I wouldn't associate it with what you were trying to do. And honestly I wasn't aware of those properties until a colleague of mine pointed them out to me so he's the real hero here. :)
Hi Rob,
that's it!
Why was that so hard to archieve.. :/ Any hints where i could have searched for it in the documentation?
Thanks for your help.iA. Kits
Hi Joerg,
Here is what I think you need to do. Just set these two properties and as long as your tables are configured such that each row only has 1 relation of it's own then it should display the type of grid you need.
dataGrid1.FieldSettings.ExpandableFieldRecordHeaderDisplayMode = ExpandableFieldRecordHeaderDisplayMode.NeverDisplayHeader;dataGrid1.FieldSettings.ExpandableFieldRecordExpansionMode = ExpandableFieldRecordExpansionMode.ExpandAlways;
I attached the example project.
The crux of the matter is, i need a different single relation for every row.
I'm working on an example project. By the way, can you see my screenshots?
"When there is more than one Field it displays these presenters so the user can tell which is which."
Yes i understand this, but in my case 1 row can only use 1 relation, so there is no need for the user to know which relation is used. Can i somehow turn this display feature off?