How to visualize a column associated with a collection class as a child row in Infragistics UltraWinGrid?

I have an UltraWinGrid related to a DataSet in which several columns themselves are of the collection class type, for example: -

[Name] - string

[Description] - string

[Components] = List<Component>

[Levels] = List<Level>

Currently, these last two fields are hidden columns when binding to a datagrid and are used to define data for binding two other datagrids to a form.

In order to provide a print appearance on the screen, I need to make two other child data elements from the first rows of data, for example:

  • Item1 Name | Item 1 Description
    • Components
      • Component1 Name | Value Component1
      • Component2 Name | Component2 value
    • Levels
      • Level1 Name | Level1 Value
      • Level2 Name | Level2 Value
  • Item2 Name | Item 2 Description
    • Components
      • Component1 Name | Value Component1
      • Component2 Name | Component2 value
    • Levels
      • Level1 Name | Level1 Value
      • Level2 Name | Level2 Value

I suspect that I need to create a new federated dataset, possibly with DataRelations, but I'm struggling to figure out how to correctly output the data.

Can someone direct me in the right direction?

+4
source share
1 answer

Well, I think I solved this one (although I clean it up a bit). The trick is to pull the β€œparent” data into a list (currently with an ugly foreach loop) and bind the grid to this, ensuring that your grid is set to MultiBand.

Since the two child collections are also List collections, they process them automatically.

A solution was found using this answer , which I will vote to express my appreciation.

+1
source

All Articles