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

Getting an edited cell value

Thread ID:

Created:

Updated:

Platform:

Replies:

95819 Aug 3,2010 09:32 AM UTC Aug 13,2010 09:56 AM UTC Silverlight 1
loading
Tags: GridControl
Chris Taylor
Asked On August 3, 2010 09:32 AM UTC

I have a grid that has been populated programmatically, but I am having trouble getting the value the user has entered in a cell. Using the CurrentCellAcceptedChanges event I can get the new value and the cell it was entered in, but only when the user presses enter, and only after the user has made one change already. If the user clicks on another cell before pressing enter I am not able to determine what was changed.

How do I determine what cell has been changed, and what it was changed to?

Muthulakshmi N [Syncfusion]
Replied On August 13, 2010 09:56 AM UTC

Hi Chris,

Thank you for your details.
You can listen CurrentCell Changed event to achieve your requirement. This event will be raised only if current cell value is changed. Also to get the new value you can use the following code snippet:

this.dataGrid.CurrentCellChanged += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(dataGrid_CurrentCellChanged);

void dataGrid_CurrentCellChanged(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
{
var renderer = this.dataGrid.Model.Grid.CurrentCell.Renderer;
var rindex = renderer.RowIndex;
MessageBox.Show("Modified Text "+ renderer.ControlText +
" Column Index "+cindex.ToString() +
" Row Index " +rindex.ToString());
}

Let us know if you need any details.

Regards,
Muthulakshmi

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

;