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

DataGrid ItemSource does not show updates to item property changes

Thread ID:

Created:

Updated:

Platform:

Replies:

124913 Jul 8,2016 01:52 PM UTC Jul 13,2016 05:42 AM UTC Xamarin.Android 5
loading
Tags: SfDataGrid
Steve
Asked On July 8, 2016 01:52 PM UTC

I have an sfdatagrid that has it's itemsource set to an observablecollection. All works ok except that I want the grid to reflect programatic changes to the properties of items in the collection. I tried removing and then re-adding the item at the same position but the change was not reflected in the grid. Then I extended the ObservableCollection class with MyObservableCollection<t> where T : INotifyPropertyChanged. When I set this new class as the grids itemsource the app crashes. No debug error in VS, it just shuts down.

How can I get the sfdatagrid to reflect changes to item properties in the ObservableCollection ItemSource?

Regards
Steve

Vimal Prabhu Manohkaran [Syncfusion]
Replied On July 11, 2016 06:03 AM UTC

HI Steve,

Thanks for contacting Syncfusion Support. 

Please refer the following KB link to achieve your requirement of "Making the SfDataGrid reflect the changes in ObservableCollection"
 

KB link : https://www.syncfusion.com/kb/6167/how-to-edit-a-column-in-sfdatagrid
 
Please let us know whether this meets you requirements. In case if it fails to meet your requirements kindly revert us with a sample reproducing the issue.

Regards,
Vimal Prabhu


Ashwini Paranthaman [Syncfusion]
Replied On July 11, 2016 06:38 AM UTC

From: Steve Kaminski
Sent: Monday, July 11, 2016 2:34 AM
To: Syncfusion Support
Subject: Re: Syncfusion support community forum 124913, DataGrid ItemSource does not show updates to item property changes, has been updated.
 

This does not look like it will solve my problem. I am not editing cells in the UI but I am changing the values of the underlying datamodel. When I do change the value of the datamodel I expect the grid to show that change in the grid but it does not. 

Do you have an example where the datamodel is changed and the grid reflects those changes?  


Vimal Prabhu Manohkaran [Syncfusion]
Replied On July 12, 2016 01:27 PM UTC

Hi Steve,

Thanks for the update. We were unable to reproduce the reported issue "DataGrid ItemSource does not show updates to item property changes". We have prepared a sample based on your requirements. In the sample choose the 'Update Data' from the picker to update values in the grid.

Sample Link :  http://www.syncfusion.com/downloads/support/forum/124913/ze/CRUD816795788

Regards,
Vimal Prabhu

Steve
Replied On July 13, 2016 01:29 AM UTC

Hi,

It turns out that the error was in my code. My model did not have a private member reflecting the public property and so when the property changed it triggered the property change handler in an infinite loop. Ouch! Sorry rookie error. The good news is that the grid now reflects updates to the underlying model. Sorry for the inconvenience.

Steve

Vimal Prabhu Manohkaran [Syncfusion]
Replied On July 13, 2016 05:42 AM UTC

Hi Steve,

Thank you for the update. Please let us know if you need any other assistance. 

Regards,
Vimal Prabhu

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.

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

;