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 05:54 PM UTC

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 06:39 PM UTC

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 26, 2004 01:11 AM UTC

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 08:06 AM UTC

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 27, 2004 03:37 AM UTC

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 07:45 AM UTC

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 10:28 PM UTC

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.

Live Chat Icon For mobile
Up arrow icon