We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridGroupingControl in Realtime

I''m trying to use a GridGroupingControl to display a CollectionBase class. All works well when the data is pre-filled, then displayed, but when I set the grid to point at the empty collection, then begin filling the collection real time, I only get 1 record visible in the grid ( there are hundreds ), and the record count in the header stays at -1. Any suggestions on where to look?

7 Replies

RK Randy Kennison August 24, 2004 01:54 PM

Second thaught... I was also looking for a way to "lock" the GridGroupingControl as you would a GridDatabaroudn grid, but I can find no Binder. Does something similar exist in the GridGroupingControl?


AD Administrator Syncfusion Team August 24, 2004 02:39 PM

When you set Table.TableDirty = true for a gridgroupingcontrol subsequent ListChanged notifications from the underlying list will be ignored (since the control has to completely repaint anyway). So, just set Table.TableDirty = true. Then add items to your collection (make sure it raises the IBindingList.ListChanged notification) and then call groupingGrid.Update. That would be the most efficient. Stefan


RK Randy Kennison August 25, 2004 09:11 PM

Not using an IBindingList derived class though. It''s drived from CollectionBase only for speed reasons. I tried making it an IBindingList dervied , but it was a 5000% decrease in spead. Is there some function I can call that will force the grid to "re-examine" it''s datasource?


AD Administrator Syncfusion Team August 26, 2004 04:06 AM

Yes, if you set Table.TableDirty = true then the grid will recategorize the whole collection the next time the grid is touched (eg. it is drawn or you call Update). Stefan


RK Randy Kennison August 26, 2004 11:37 PM

This works great, if I do not have a heiarchy setup. Once I set a relation to another, I will get the first record. That first record will update. But nothing more appears. The Count in the titlebar does not adjust either. If I have no relations, the titlebar does count up with records being added, but calling grid.Update() does not update. If I click on a heading, all the records appaear, and sort. But prior to that step, there are no visible rows.


AD Administrator Syncfusion Team August 27, 2004 03:45 AM

In a hierarchy setup trying setting Table.TableDirty = true for each related table. Are the related tables a master/detail setup with primary/foreign keys or is it a ChildList in your CollectionBase? You can get a reference to related tables when you call groupingGrid.GetTable(tableName) if you do have a master/details setup. If that doesn''t help please post a small sample. Then I can debug into it. Thanks, Stefan


RK Randy Kennison August 27, 2004 06:28 PM

Odd.... But I have it now Thanks.. Here is the souce of some really flakey output. If you do this... eGrid.DataSource = x; Prior to setting the relations and calls to SourceListSet.Add to add the multiple sources , in a heirachial setup, everything get''s unstable, and the behavior is not consistant with the results either. Thanks again.

Loader.
Live Chat Icon For mobile
Up arrow icon