How to commit the Edited cell values in Xamarin.Foprms DataGrid view?
In SfDataGrid Edited GridCellvalues will be updated in view only if corresponding model class has been implemented from INotifyPropertyChanged and raised PropertyChanged for corresponding model object. Otherwise edited values not updated in view after EndEdit. Please refer the below code example
public class OrderInfo : INotifyPropertyChanged { public OrderInfo() { } private int _orderID; public int OrderID { get { return _orderID; } set { this._orderID = value; RaisePropertyChanged("OrderID"); } } public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(String Name) { if (PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(Name)); } }
Note: List does not have PropertyChange support so if we use List as SfDataGrid.ItemsSource, then Edited grid cell values not updated. Need to use only support PropertyChanged collection types.
Conclusion
I hope you enjoyed learning about how to commit the Edited cell values in Xamarin.Forms DataGrid view.
You can refer to our Xamarin.Forms DataGrid feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin.Forms Chart documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!