gbenshim said:my data structure may have diffrent band depath in diffrent rows
It still might be feasible as long as the structure is consistent and your data source can provide information on the structure at each level even when there are no rows. That's where IEditableObject comes in. But it could be tricky, and I'd probably use the tree if you can.
gbenshim said:What do you mean by UltraWinTree "unbound"? - Is this a diffrent control than the UltraWinTree? Or the same but without DataSource Binding?
It's the same control. The UltraWinTree control can be data bound, but you can also use it unbound and simply use the Add method on the nodes collection to add the nodes yourself.
gbenshim said:Will i be able to build a tree which each node is Multi-Culomn?
Yes, the tree supports multiple columns use ColumnSets.
Hi Mike,
Thanx for the information, my data structure may have diffrent band depath in diffrent rows - so i assume this clears the idea that the grid doesn't fit my needs.
What do you mean by UltraWinTree "unbound"? - Is this a diffrent control than the UltraWinTree? Or the same but without DataSource Binding?
Will i be able to build a tree which each node is Multi-Culomn?
Thanx a lot for the help guys, i appriciate it.
Gilad
Hi Gilad,
If you use the UltraDataSource, it will ask for rows as they are needed, like when a Row expands.
There is an event on the grid called BeforeRowExpanded. But I'm not sure loading the data in the this event will work. The grid's DataSource needs to be homogenous. You can't have different band depths at different levels. This might work okay as long as the data structure exists from the beginning and your data objects implement IEditableObject so that the BindingManager can create dummy rows in order to get the data structure when the real rows haven't been added yet. It really depends on the data source.
You might want to consider using UltraWinTree unbound. There's actually a sample in the NetAdvantage SDK that does exactly what you are describing, loading child nodes only when the parent node is expanded. The tree doesn't have some features that the grid has like filtering and summaries, but depending on the needs of your application, it might work better for you.
Myabe somehow it could be done with registering to events on UltraGridRow, such that when the row expantion status changes - i will initiate a code to build the child table, will link it to the parent table and will make it visible?
I will make myself even clearer:
I want to build a table from scratch, i will query the DB and will fill the table, i want to have an "expand" button attached to each line (like a "+").
I'm wondering if there is an event like "OnExpand", an when this event will occur - i will build the data for the child table and will fill it myself.
This want not all the data will be loaded on start and it will be posible to handle recursive data structure like i have.
Your help is very importent to me, i will really appriciate your help.
Thanx,