I've created a custom control using the MSFlexGrid as the base control. I've added navigation and editing capabilities, etc.
My problem is when I use it in a project and I move from a textbox to the custom control using the tab key. My control will not receive the focus when the tab key is pressed the first time to leave the textbox.
I've added code to the Text1 LostFocus event to make my custom grid receive the focus. I've gone so far as to assign the Col and Row numbers before and after using the Setfocus for my control.
When I tab off of the textbox nothing has the focus. I can use shift tab to move back to the textbox. When I leave the textbox for the second and subsequent times, the custom control receives the focus as expected.
I know that nothing else has the focus as I have only 2 controls which can receive focus. The first time I tab off of the textbox I can tab back into the textbox. When I next tab to the custom grid, the custom grid now has the focus and I cannot tab back to the textbox. This proves that nothing has the the focus after the initial tab off of the textbox. This is the behavior I expect after the initial tab off of the textbox.
I expect and so would the client, that when they click the tab key once they should be able to use the up and down arrow keys to navigate the grid. This is possible once the custom grid has the focus.
Any ideas would be greatly appreciated.