Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
Binding to a two level object and customize the field layouts
posted

Hi

I bind my own object to the "XamDataPresenter", my object looks like this:

Class A

{

public List<A> Children;

public string ColumnA,ColumnB,ColumnC....

}

It's a two level structure. If I set  AutoGenerateFields to true, the Presenter will show the two level structure correctly.

But if I try to apply the FieldLayouts to customize the Presenter . I'll loss the second level information

How can I keep two level structure while customize the field layouts? 

 

Thanks

  • 30945
    Offline posted

    Hello,

     

    I am just checking if you require any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support    

  • 30945
    Suggested Answer
    Offline posted

    Hello,

     

    I have been reading through your description and when you are creating the FieldLayouts for the XamDataGrid with AutoGeneratedFields set to false you should include a Field in the first hierarchy level which will represent the child data. For example when you are creating fields for your “Class A” you should include the following field in the FieldLayout:

                   

    <igDP:Field Name=”Children”/>

     

    I am attaching a sample application which shows how you can define the FieldLayouts for two level hierarchy for XamDataGrid in XAML and in code behind.

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    HierarchicalDataInCodeAndXAML_.zip