Hi,
I'm new to Infragistics controls and trying for some days now to create a (hierarchical) data structure in C# that will be displayed on a UltraGrid the way I need it. At first I created my own data structure, but then I found out that the data needs to be a dataset/table or it needs to implement the list interfaces.
I need a representation of my data like this:
+ Vehicles (header with indentable plus/minus sign)
- Persons (header with indentable plus/minus sign)
Surname | Firstname | Checkbox | ... (Columns of Persons)
- Doe | John | ... (Row entry of Persons)
- Addresses (header with indentable plus/minus sign)
Street | Zip | City | ... (Columns of Addresses)
+ Main Str | 12345 | .... (Row entry of Addresses)
+ South Str | 12345 | .... (Row entry of Addresses)
- Doe | Mike | ... (Row entry of Persons)
... (more entries)
+ Organizations (header with indentable plus/minus sign)
+ ...
I tried to put everything in generic lists, but I wasn't able to get this indentable plus/minus sign on headers like I need it. As a compromise I created a class which included a String Name property and a generic list of the actual objects which holds the data I want to show in the grid. When I removed the Name property (the class was also only consisting of the list) the grid showed nothing. Since I can only show one datasource at a time, I created another class with one property and all collections (vehicle list, persons list, ...) and bound a list of this to the grid's datasource. I think that way is sort of ugly and too complicated (A list of a class which holds other lists of classes and every one of those classes had a list of a class with a list...) and I had also the problem that in the highest list this one property which is needed to display the underlaying lists is not realIy wanted.
Therefore, I'm now trying to achieve my goal with a DataSet. But I realized that every DataTable in this DataSet needs to be in a DataRelation to get displayed (or only the first table will be shown). As you can see, there is in my representation not only one highest parent Table which is the root of this hierarchical tree, there a more. Is there any way to achieve that like I need it?
Thank you for any answers,
Rene D.
I suggest you to look the samples which you get with instalation of our controls. There are similar example of your request. You can find the example if you start the Feature Browser and navigate to :
Infragistics\NetAdvantage2010.\Windows\Forms\Samples\Infragistics.Guidance.WinForms.FeatureBrowser.exe"
-> Navigation -> WinTree -> Multo-Column and Data Binding
Please, if you have any questions, do not hesitate to ask me.
Regards
Georgi