I am trying to use the hierarchical layout of the XamDataGrid to render our structure.
The problem I'm having is that I have objects of the same type at different levels of the hierarchy.
For example:
class A {
... some properties
}
class B {
public IReadOnlyList<A> As { get; }
class C {
... some prperties
public IReadonlyList<B> Bs { get; }
I have an <igDp:FieldLayout Key="_"/> for A, B, and C.
The problem I'm encountering is that when I expand C, I can expand the A property and see the fields in the individual A records. I can also expand the Bs and see the properties of the B records. However, when I expand the As under the B records, I get empty rows (all that is displayed is the row indicator).
It appears as if once the layout has been matched at one level of the hierarchy, it can't match at a deeper level. As the records are of the same type (Key=""), I don't see a way to even define a duplicate layout and disambiguate it.
Any help you can provide would be greatly appreciated.
Hello,
You should be using different keys, as shown in this example:https://www.infragistics.com/help/wpf/xamdatapresenter-define-a-field-layoutCan't see a scenario where you can ever repurpose a layout in this manner exactly.
I'm not sure that I follow. That article specifically states that the FieldLayout's Key field should be set to the data type of the field. The data type in both case is 'A'. Why isn't the field layout being used in both cases?