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

How to commit the edited values when binding Dictionary in SfDataGrid?

Platform: Xamarin.Forms |
Control: SfDataGrid |
.NET Framework: 4.5.1

By default, Dictionary does not notify property changes and hence the edited values will not get committed when bound with a Dictionary in SfDataGrid.

However, this can be achieved in SfDataGrid by customizing the cell renderers. Please follow the below steps.

  1. Customize the GridCellTextViewRenderer and override the CommitCellValue method.
  2. In the CommitCellValue method, obtain the edited value using the GetControlValue method. Then replace the actual value of the bound property with the edited value for the editing cell and update the new values in the grid using UpdateCellValue method.
  3. For refreshing the new cell value in view, call the RefreshDisplayValue method.
  4. Finally, you must modify the cell renderer mapping by replacing the existing TextView entry with the customized cell renderer in the SfDataGrid.CellRenderers collection.

Refer the below code example to commit the edited values in dynamic collection.






C:\Users\pavithra.sivakumar\AppData\Local\Microsoft\Windows\INetCache\Content.Word\Editing cell.png


Sample Link: How to commit the edited values when binding Dictionary in SfDataGrid?

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment
Oct 23, 2019

Hello, Could I overcome this problem by implementing an IDictionary and INotifyPropertyChanged?


Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile