I have a custom collection called AccountCollection that implements IList, IBindingList and IListSource. The collection contains Account objects. Each Account is a simple class with 3 properties - a string AccountId, an int Total, and an AccountCollection (because each Account can have Sub Accounts of the same type).
I hydrate this collection with some accounts (e.g. "AA", "BB" etc.) and add 2 sub accounts to each account (e.g. "AA" has sub accounts "aa001", "aa002"; "BB" has "bb001", "bb002" etc.).
I bind my GDBG to this collection, and set up a GridHierarchyLevel for the relation. Additionally, I have a timer that increments the Total for each sub account and aggregates the subaccount totals into the parent account Total, within a BeginUpdate(Invalidate), EndUpdate block.
The issue I''m having is that if I have 5 accts, and none of them are expanded, all 5 rows are refreshed. However, if I expand the first acct to display its sub accts, the grid still only refreshes the first 5 rows. Therefore, the last 2 acct rows don''t refresh.
I suspect I''m doing something wrong in the RaiseListChangedEvent method in my Custom collection. I''m attaching the test application.
Please advise.
Regards,
Ramya
AccountTest_6565.zip