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

CurrentCellChanged edit value

Thread ID:





102420 Jan 30,2012 05:16 PM UTC Jan 31,2012 07:08 AM UTC WPF 1
Tags: GridControl
Rich Fabros
Asked On January 30, 2012 05:16 PM UTC


I was wondering how i will be able to get the value that the user is currently typing in a cell in a GridDataControl.

I need it to validate the input as the user types it in.

I am using Unbound columns throughout my grid. So i use query cell info command, and the values of the cells aren't directly bound to any property.

Currently, I'm trying to use CurrentCellChanged event to try and get it. but there doesn't seem to be any reference to it in



Rajasekar [Syncfusion]
Replied On January 31, 2012 07:08 AM UTC

Hi Rich,

Thank you for your update.

You can achieve your requirement by handling the below events based on your desired scenarios,

dataGrid.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell;
dataGrid.CurrentCellActivated += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(dataGrid_CurrentCellActivated);
dataGrid.CurrentCellDeactivated += new GridCurrentCellDeactivatedEventHandler(dataGrid_CurrentCellDeactivated);

void dataGrid_CurrentCellDeactivated(object sender, GridCurrentCellDeactivatedEventArgs args)
(this.dataGrid.Model.CurrencyManager.CurrentCell.Renderer.CurrentCellUIElement as TextBox).PreviewKeyDown -= new KeyEventHandler(MainWindow_PreviewKeyDown);

void dataGrid_CurrentCellActivated(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
(this.dataGrid.Model.CurrencyManager.CurrentCell.Renderer.CurrentCellUIElement as TextBox).PreviewKeyDown += new KeyEventHandler(MainWindow_PreviewKeyDown);

void MainWindow_PreviewKeyDown(object sender, KeyEventArgs e)
//do your actions here

Please let us know if you have any queries.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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