I have a Grid that looks like this...
The grid is setup so that when I press 'Tab' it goes down, instead of across. It will hit the cells in the order of 1,2,3,4,5,6,7,8 and when I press tab while cell 8 is selected...it correctly moves to the next control (the next control button). So the NextControlOnLastCell works perfectly, in this case.
If I change the positioning of my grid to look like this...
If I start in Col 1 and press tab, I'll go into 2,3,4...and then I'll go to the next control. How do I let the grid know that I intend to navigate 'down' instead of 'across' so that it considers the rightmost, downmost cell to the be last and not the downmost, rightmost cell?
Thanks!
Hi Rob,
I think you just need to set the TabIndex on the columns.
Hey Mike,
Thanks for the response. Setting the TabIndex will let me specify the order of the tabs; my problem is that the grid's properties are set in such a way that the user can move/rearrange the position of the columns at run-time.
Is there a way for me to find out, visually, how the cells/columns are arranged on the screen, so that can reset the TabIndex's on the fly? Or even if there is an event for me to handle when a user moves the position of a column?
I'm not sure how you would determine the locations of the cell relative to each other. You can examine the RowLayout properties, but I think the reason the grid doesn't so this for you automatically is that it's probably not easy to interpret. You can use the AfterColPosChanged event to trap when the user moves a column. I'm not sure if that really helps, though.