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.

GridDataControl and data changes on a DataSet

Thread ID:

Created:

Updated:

Platform:

Replies:

91733 Nov 30,2009 11:41 AM Nov 30,2009 11:46 AM WPF 1
loading
Tags: GridControl
Russell Judge
Asked On November 30, 2009 11:41 AM

From other code, I want to add a row of data to a table that is bound to a GridDataControl on a XAML page. Since the dataset does not implement the INotifyPropertyChanges interface, the GridDataControl doesn't reflect the new row.

However, I created a class that inherits my stongly-typed dataset and implements the INotifyPropertyChanges interface. My new class subscribed to the strong-typed RowChange and TableNewRow events, raising the PropertyChanged event correctly. I put breakpoints in to confirm the event is being raised correctly. However, the GridDataControl still won't reflect a new row that gets added to the datatable.

I am using this method so that new datarows can be pre-populated with certain default and calculated data.

What am I missing--how can I get the GridDataControl to refresh its binding so that it will reflect added rows?

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On November 30, 2009 11:46 AM

Hi Russell,

Thanks for using Syncfusion products. The INotifyPropertyChanged interface specifies only changes in the underlying objects, For the grid to recognize Add/Remove/Modify operations, You would have to implement INotifyCollectionChanged interface in the underlying collection that you set as ItemsSource to the Grid, If you want to use .NET FW collection, then ObservableCollection is the best to use.

We also recently added up IListChanged interface to specifically listen to that, although this is not available in our ES 2009 Volume 4 release, You can raise a DirectTrac incident to check out.

Please let me know if you need any more details.

Thanks,
Fahad

CONFIRMATION

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.

;