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. Image for the cookie policy date

CurrentCell KeyPress

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?



1 Reply

RA Rajasekar Syncfusion Team 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




Loader.
Live Chat Icon For mobile
Up arrow icon