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
close icon

GGC: HowTo maintian group and cell position when refreshing data.

I have code that refreshes the GGC when the underlying table changes outside of the editor (Using Checksums).

I am wanting to refresh the data within the Grid grouping control but when I do this the groups collapse and the current cell lost.

I refresh the data by rebinding the gridsdatasource.

Me.DataGrid.DataSource = _BoundResultSet

Is there an easy way of making the refresh of data seamless to the end user? am I going to have to record the state of the grid prior to the refresh and then reload?

Any pointers welcome.

Many thanks.

1 Reply

RR Ramya R Syncfusion Team August 22, 2007 06:29 AM UTC

Hi Dan,

Thank you for your interest in Syncfusion Products.

When changes are made to DataSources like DataTable or DataSet, the changes are automatically updated in the grid.

If your intention is to update the grid with the changes made to the DataSource like BindingList then it can be done by using IBindingList.ListChanged event. If this event is not raised by the data collection, then you can set Table.TableDirty = true to force the grid to refresh itself.

The benefits of using IBindingList include the support for change notifications when the list is modified. It does have a ListChanged event which will be fired upon any data changes. If the collection supports changes, it should also support firing a ListChanged event when the collection changes. To indicate that, it should return true from the SupportsChangeNotification property. Hence when items are added or removed from the collection, the grouping grid will be notified of these changes and will update itself automatically.

Kindly refer the IBindingList (Syncfusion\EssentialStudio\5.1.0.51\Windows\Grid.Grouping.Windows\Samples\2.0\CustomCollections\IBindingList)sample which ships with our Essential Grid Package to know how grid can be updated with changes made to the bindinglist.

Please let me know if you have any queries.

Thanks & Regards,
Ramya.

Loader.
Live Chat Icon For mobile
Up arrow icon