I understand that if you bind a collection whose members include another collection you will by default get hierarchical field layouts. But is there a way to join the two field layouts so that the properties of the parent model are displayed in line, for n rows, where n is the number of child data models? Like an inner join of two tables where the shared value appears in a one->many pattern. Thanks.
I assume you would like to hide all parent rows, and include the information from the parent row in every child row. If this is the case, the best way would be to create a method that returns a new collection of objects with all properties you would like to be displayed and bind the grid to it.
Hiding parent rows will always hide the child rows as well. The only workaround would be to set the height of the parent row to 0 and make the borders transparent, but that will not remove the indentation between the rows and make it feel unnatural and unaesthetic.
Should you have any further questions, please let me know.
Sincerely,Tihomir TonevAssociate Software Developer
So i definitely want to avoid workarounds that tweak the appearance of rows, feels a bit hackish.
Is there a sample that maybe indicates a reasonable and efficient pattern for the method you're suggesting?
Don't worry about it if there's no existing sample or example you can point me to, I only want to know if there's a recommended best practice for this use case.
My thought right now: I'm sure I could extend the child class to include fields from the parent class, and have parent produce a collection of child+parent type objects, but I'm curious if there are any recommended solutions that would let me avoid having redundant object properties in a new class.