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.

Activating a cell in the KeyDown event

Thread ID:

Created:

Updated:

Platform:

Replies:

4052 Apr 25,2003 05:15 AM Apr 25,2003 11:58 AM Windows Forms 2
loading
Tags: GridControl
Olivier Choquette
Asked On April 25, 2003 05:15 AM

I want my cell to enter the "edit" mode only when text is typed into it. I set the ActivateCurrentCellBehavior to GridCellActivateAction.None and do a BeginEdit in the overrided OnKeyDown method. The cell enters the edit mode but the first key stroke (the one that triggered the BeginEdit) is not added to the cell text. Olivier

Administrator [Syncfusion]
Replied On April 25, 2003 07:16 AM

Are you calling the base class in your OnKeyDown override? You really should only have to set GridCellActivateAction.None. Pressing any key (that is not a navigation key like tab or arrows) on a cell should activate it even with GridCellActivateAction.None (unless you are using a particular celltype like Static that does not support editing, but it should work for the default TextBox). If you are not seeing this behavior, then its is probably a bug. What grid version are you using, and can you see this behavior in one of our samples so we can try to reproduce it here.

Olivier Choquette
Replied On April 25, 2003 11:58 AM

Setting GridCellActivateAction.None fixed the problem... i just didnt notice it sorry, my mistake :) Olivier

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.

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.

;