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
765
XamGrid binding to hierarchical ObservableCollection
posted

Hi,

can someone show me a sample project in which a xamgrid with a fixed hierarchical column layout binds to a hierarchical observablecollection.

 

Thanks for your help

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    I'm not exactly sure what you're asking. Assuming you have AutoGenerateColumns set to true (which it is by default) the xamgrid will find your IEnumerable properties and automatically make ColumnLayouts for them which will result in a hierarchy for you. 

    You can also manually define the hierachy though if you don't want it to be generated in which case you need to add ColumnLayout objects to your Column's collection, where the key of the columnlayout corresponds to the property in you underlying data that is your ObservableCollection. 

    We have a sample in our Samples browser that shows this: 

    http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/hierarchical-data

    -SteveZ

Children
No Data