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

Activating a cell in the KeyDown event

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

2 Replies

AD Administrator Syncfusion Team April 25, 2003 11:16 AM UTC

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.

OC Olivier Choquette April 25, 2003 03:58 PM UTC

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

Live Chat Icon For mobile
Up arrow icon