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
330
how to populate dynamic columns from a collection?
posted

OK... I have kindof a sepecialised case.  I am getting log data back from a DB that has 5 static properties and then any number of variable properties.  The class looks like this:

Prop 1, prop 2, prop 3, collection of properties 4-n... all possible properties are known.

Based on the type of log, properties 4-n will be different, again, all possible properties will be known.

The values of these properties will always be text.

binding properties 1-3 are easy... but is it possible to bind column values to items within a sub collection? for example, key="{Binding PropCollection.Prop4}"

Thanks in advance for any help

Marc

Parents
  • 40030
    Offline posted

    Hi Marc, 

    If all properties are known, couldn't you create an object that contains properties for all possible properties being sent to the client?

    Then when you get the data, loop through the properties and create columns for the props you got back?

    If thats not possible, you can explore the options suggested in the following post, using TemplateColumns with DataTemplates built from strings, or creating a custom Column. 

    http://community.infragistics.com/forums/p/32185/175645.aspx#175645

    -SteveZ

     

     

Reply Children