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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfDataGrid NumericColumn How and when to get value after value is edited?

Thread ID:

Created:

Updated:

Platform:

Replies:

130876 Jun 8,2017 08:35 AM UTC Jun 12,2017 10:30 AM UTC Xamarin.Forms 3
loading
Tags: SfDataGrid
Richard Hadlow
Asked On June 8, 2017 08:35 AM UTC

Hi,

was wondering how to get the value of a numeric cell after the user has edited the cell and changed the value. In what event should this retrieval be tasked?

When i use the CurrentCellEndEdit event, the GetCellValue shows the value from the Binding Model (previous value), but I can see thew new value in the renderer -> currentCellRendererElement object.

Could you please advise on the best way to achieve this please.

Thanks in advance,
Richy

Ashok N [Syncfusion]
Replied On June 9, 2017 09:47 AM UTC

Hi Richy, 
 
Thanks for contacting Syncfusion support.  
 
You can achieve your requirement by handling same CurrentCellEndEdit and SfDataGrid.GetCellValue method with help of asyn and await. Because it will take some time for notify the property changed in view while change the new value. Please refer the below code example: 
 
private async void DataGrid_CurrentCellEndEdit(object sender, GridCurrentCellEndEditEventArgs args) 
{ 
    await Task.Delay(100); 
    var newCellValue = dataGrid.GetCellValue(viewModel.OrdersInfo[args.RowColumnIndex.RowIndex - 1], dataGrid.Columns[args.RowColumnIndex.ColumnIndex].MappingName); 
} 
 
Regards, 
Ashok 


Richard Hadlow
Replied On June 9, 2017 01:09 PM UTC

Hi Ashok,

that did the trick. Thanks

Richy


Ashok N [Syncfusion]
Replied On June 12, 2017 10:30 AM UTC

Hi Richy, 
 
Thanks for your update. Please let us know if you require further assistance on this. 
 
Regards, 
Ashok 


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

;