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

CurrentCell KeyPress

Thread ID:

Created:

Updated:

Platform:

Replies:

100075 Jun 30,2011 04:25 PM UTC Jul 7,2011 08:42 AM UTC WPF 1
loading
Tags: GridControl
Jose Colmenarez
Asked On June 30, 2011 04:25 PM UTC

I have a WPF application using the control GridDataControl,

I want to change the value of the key pressed, but I not have an event such as CurrentCellKeyPress winform control

I'm using the OnCurrentCellPreviewKeyDown but not allow changing the value of key pressed, which method could be used in WPF to make the change?



Rajasekar [Syncfusion]
Replied On July 7, 2011 08:42 AM UTC

Hi Jose,

Thank you for your update.

You can achieve your requirement by setting e.Handled as True in PreviewKeyDown of the dataGrid like shown below,

Code Snippet[C#]
this.grid.PreviewKeyDown += new KeyEventHandler(grid_PreviewKeyDown);

void grid_PreviewKeyDown(object sender, KeyEventArgs e)
{
e.Handled = true;
}

For your reference we have prepared the sample, please find the sample in the below location,

Sample: < http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=DataContext-733814108.zip >

Please let us know if you have any queries.

Thanks,
Rajasekar




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

;