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.
Unfortunately, activation email could not send to your email. Please try again.

GGC adding new record to grid does no show

Thread ID:





46217 Jul 7,2006 05:38 PM Jul 7,2006 05:56 PM Windows Forms 1
Tags: GridControl
Brian Corley
Asked On July 7, 2006 05:38 PM

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.

Administrator [Syncfusion]
Replied On July 7, 2006 05:56 PM

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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.