CurrentCellEditingComplete: retrieving entered value and MappingName

Hello,

I'm using the GridDataControl in a WPF project. In the CurrentCellEditingComplete I want to retrieve the value entered and the MappingName of the corresponding column. Below you can see the code lines I tried. Unfortunately none of them worked. Can someone give me the correct code lines?

Thanks in advance!

-------

private void DeelprojectenWerknemerGridDataControl_CurrentCellEditingComplete(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)

object currentCellValue;

GridDataControl gridDataControl;

gridDataControl = sender as GridDataControl;

Detailplanningregel detailplanningregel = gridDataControl.SelectedItem as Detailplanningregel;

GridCellData gridCellData = gridDataControl.Model.Data;

int columnIndex = gridDataControl.Model.CurrentCellState.ColumnIndex;

int rowIndex = gridDataControl.Model.CurrentCellState.RowIndex;

GridStyleInfoStore gsis = gridDataControl.Model.Data[rowIndex, columnIndex];

currentCellValue = gridDataControl.Model.Data[rowIndex, columnIndex];



1 Reply

KG Kasthuriraja G Syncfusion Team March 17, 2014 10:32 AM UTC

Hi Edwin,

Thanks for using Syncfusion products.

We have analyzed your query and you can achieve your requirement by using CurrencyManager. Please refer the below codesnippet.

 Code snippet[C#]:

dataGrid.CurrentCellEditingComplete += dataGrid_CurrentCellEditingComplete;

 void dataGrid_CurrentCellEditingComplete(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)

        {

            if (this.dataGrid.Model.CurrencyManager.CurrentCell.Renderer.ControlValue != null && this.dataGrid.Model.CurrencyManager.CurrentCell!=null && this.dataGrid.Model.CurrencyManager.CurrentCell.Renderer!=null)

            {

                MessageBox.Show(this.dataGrid.Model.CurrencyManager.CurrentCell.Renderer.ControlValue.ToString());

 

            }

           

        }

Please refer the attached sample.

 Please let us know if you have any queries.

Thanks,

Kasthuriraja G


Attachment: CurrentCellEditComplete_b27f0ba6.zip

Loader.
Up arrow icon