We need to add summary in rows that could be children of their parents. For example:
Banks 5000
Bank1 4000
Bank1 A 3000
Bank1 B 1000
Bank2 1000
Accounts .....
How can we do this? Can using WinTree help?
I'm afraid I do not understand your question. UltraWinTree does not have any Summary functionality, so it seems that WinGrid would be better. But I don't really know what you are asking.
It does not matter if it is WinTree or WinGrid. But I think it WinTree must have summary!
Let me define them in table. Suppose in a table an account could have a parent, which is a child of another account.
Table Accounts: Bank1 and Bank2 are children of Banks. Bank1A and Bank1B are children of Bank1. and so on...
ActID Name ParentActID
1 Banks NULL
2 Bank1 1
3 Bank2 1
4 Bank1A 2
5 Bank1B 2
6 Bank2A 3
7 Bank2B 3
So the hierarchy is:
Banks
Bank1
Bank1A
Bank1B
Bank2
Bank2A
Bank2B
Table Transactions:
TransactionID ActID Amount Date
1 1 1000 1/1/08
2 2 500 1/2/08
3 2 700 1/3/08
4 3 800 1/4/08
and so on....
Now we want to present this in a view
The WinGrid must show
Name Total Amount
+ Banks 1000+500+700+800
+Bank1 500+700
+Bank2 800
----------------------------------------------------------------
Note that when we click the plus sign '+' before account name for example "+Banks", it must expand and show the transactions. 1000+500+700+800, must be raplaced with the total amount and here is given for illustration.
So, each parent shows its children total as well. So when the paren is expanded, it shows its own transactions with its children that are collapes, and when a child is expanded it should show all its transactions.
It looks like maybe you want to use the OutlookGroupBy functionality of the WinGrid to group your data. But I'm still not really clear on what you need, so I'm not sure. Your last illustration seems to be displaying rows from different bands as sibling rows in the same collection. That's not possible, so if that's what you want, you will need to create a new data structure.
You can do it with Infragistics controls. I was referring to the Infragistics UltraWinGrid control.
In my opinion it was nicer if we could do this with infragistics controls. I think a parent of one or more children must have the total of all its children displayed.