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

GGC adding new record to grid does no show

I am using the GGC and binding it to a custom collection class (that implements CollectionBase and IBindingList). the first time I bind to it everything works fine. the grid displays properly when i add and remove items from the collection. I call the following code: grid.TableDescriptor.Name = HEADERS; // Register any IList with SourceListSet, so that RelationDescriptor can resolve the name this.grid.Engine.SourceListSet.Add(HEADERS,Headers); this.grid.DataSource = Headers; Now, if I want to bind to a new collection of the same type, I first call grid.ResetTableDescriptor(); grid.TableDescriptor.Relations.Reset(); grid.DataSource = null; grid.DataMember = null; grid.Refresh(); to clear old stuff out. I rebind and now when I add or remove stuff from the collection the grid does no show the changes.

1 Reply

AD Administrator Syncfusion Team July 7, 2006 09:56 PM UTC

Hi Brain, An arbitrary IBindingList DataSource does not fire any events to notify any changes. In such cases, you would have to explicitly call grid.Refresh and grid.ReIntialize method after the arraylist changes. Here is a code snippet. this.groupingGrid1.BeginUpdate(); CustomerCollection cc = this.groupingGrid1.DataSource as CustomerCollection ; cc.Add(new Customer("22222333")); this.groupingGrid1.EndUpdate(true); this.groupingGrid1.Reinitialize(); this.groupingGrid1.Refresh(); Regards, Haneef.

Loader.
Live Chat Icon For mobile
Up arrow icon