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

CurrentCellEditingComplete: retrieving entered value and MappingName

Thread ID:

Created:

Updated:

Platform:

Replies:

115984 Mar 11,2014 02:48 PM UTC Mar 17,2014 10:32 AM UTC WPF 1
loading
Tags: GridDataControl
Edwin Willemse
Asked On March 11, 2014 02:48 PM UTC

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];



Kasthuriraja G [Syncfusion]
Replied On 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

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

;