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

Grid Focus and KeyDown

Hi All, I have a dataBoundGrid on a form that serves as a popup window. I load the grid with the following settings: grid.ListBoxSelectionMode = SelectionMode.One And in the grid.CurrentCellActivating event: e.ColIndex = 0 I need row-selection visually. I''ve tried grid.currentcell.move(to,up,down,etc)and the grid gets focus but the arrow keys don''t work. The form is being shown modally. Tried everything i could think of to get the grid to respond to the keyboard, but the keyboard is not active until i click on the grid with the mouse. How can i make the form popup with the grid active and responsive to keystrokes? I''m using VB.Net and SyncVersion 3.x Thanks in advance for any help. Felix

3 Replies

AD Administrator Syncfusion Team April 6, 2005 04:47 PM UTC

I tried to reproduce the problem, dropping a griddataboundgrid on a form, and the poping this form up when you click a button and another form. http://www.syncfusion.com/Support/user/uploads/GDBG_PopupForm_702684c7.zip Using 3010, I did not see the problem in this sample. Do you? Exactly how is the grid parented? Is its parent teh form, or is there some container like a paenl or groupbox or udercontrol or ??? between the grid and the form? If so, you might try setting form.ActiveControl = grid, followed by grid.Focus() to see if that affects this problem.

AD Administrator Syncfusion Team April 6, 2005 05:24 PM UTC

Hi Clay, the only thing on the form is the grid and a label. The parent object of the grid is the form itself. I downloaded your code and will try your suggestions. Back to you soon. Thanks

AD Administrator Syncfusion Team April 6, 2005 06:33 PM UTC

Hi Clay, I dropped the grid from the form and started over. It seemed to work. Not sure what happened. Setting all the grid properties that we were interested in through the property explorer at one time caused the grid to fail again. Then, starting over once more, we set the properties one at a time, with a build in between. We ended up with the same property set as before except now the grid works! Go figure. Don''t have time to find the exact cause of this, but at least we are aware that it can happen. Thanks for the help. Felix

Live Chat Icon For mobile
Up arrow icon