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

Editing cell

Thread ID:

Created:

Updated:

Platform:

Replies:

129284 Mar 9,2017 02:04 PM UTC Mar 13,2017 06:56 AM UTC Xamarin.Forms 3
loading
Tags: SfDataGrid
Andy Link
Asked On March 9, 2017 02:04 PM UTC

Hi, I need to get the value of edited cell. Currently I use the event "CurrentCellEndEdit" and the property AllowEditing="True" but I don't know how to get the value of edited field.

Vimal Prabhu Manohkaran [Syncfusion]
Replied On March 10, 2017 09:49 AM UTC

Hi Andy,

Thanks for contacting Syncfusion support.

Please find the below code snippet to achieve your requirement.

 
dataGrid.CurrentCellEndEdit += DataGrid_CurrentCellEndEdit;

//current cell end edit Event Handler 
private void DataGrid_CurrentCellEndEdit(object sender, GridCurrentCellEndEditEventArgs args) 
{ 
    // Will be hit here before the values are committed to the collection. 
    // Will be hit once the editing focus is lost for that gridcell. 
    // Values will be committed into the underlying collection only after the execution of this event 
    if (dataGrid.Columns[args.RowColumnIndex.ColumnIndex] is GridTextColumn) 
    { 
        var editedValue = this.dataGrid.CellRenderers["TextView"].GetControlValue(); 
    } 
    else if (dataGrid.Columns[args.RowColumnIndex.ColumnIndex] is GridPickerColumn) 
    { 
        var editedValue = this.dataGrid.CellRenderers["Picker"].GetControlValue(); 
    } 
    else if (dataGrid.Columns[args.RowColumnIndex.ColumnIndex] is GridNumericColumn) 
    { 
        var editedValue = this.dataGrid.CellRenderers["Numeric"].GetControlValue(); 
    } 
    else if(dataGrid.Columns[args.RowColumnIndex.ColumnIndex] is GridDateTimeColumn) 
    { 
        var editedValue = this.dataGrid.CellRenderers["DateTime"].GetControlValue(); 
    } 
} 
 

However we have plans to provide the edited value in the event arguments which may be available in any of our upcoming releases.

Regards,
Vimal Prabhu
 


Andy Link
Replied On March 10, 2017 08:42 PM UTC

Thanks you

Vimal Prabhu Manohkaran [Syncfusion]
Replied On March 13, 2017 06:56 AM UTC

Hi Andy,

You are welcome. Please let me know if you may require 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

;