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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl and data changes on a DataSet

Thread ID:





91733 Nov 30,2009 04:41 PM UTC Nov 30,2009 04:46 PM UTC WPF 1
Tags: GridControl
Russell Judge
Asked On November 30, 2009 04:41 PM UTC

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 04:46 PM UTC

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.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon