Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
Tab order and updates that "unhide" hidden columns.
posted

I have a situation involving three columns in a grid.  Because I am not feeling creative lets call them 1, 2, and 3. :-) 

At the beginning of the flow, a cell in column 1 is active, column 2 is hidden, and column 3 is visible and enabled.

If I make a change to column 1 that will cause column 2 to "unhide" and tab out, column 2 appears, but the active cell moves to column 3. It appears that at the time of the tab press, the destination column is already determined.  It makes sense...the grid has no way of knowing that column 2 is about to be available.

However, I would really like the active cell to land on column 2.

Can you suggest a good mechanism to make this happen?  I have something that works, but I don't think it is the most elegant solution...and I have to assume this is a pretty common issue.

Thank You!

Darin

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Darin,

    What event are you using to show the hidden column?

    My suggestion would be to try handling this in the BeforePerformAction method. Assuming the user is pressing the Tab key to move from cell 1 to cell 3 and you want to redirect them to cell 2, instead, you could use BeforePerformAction to trap for the NextCellByTab action. Assuming that you can detect that column 2 will soon become visible, you could cancel the action, and then set focus to cell 2. Of course, there's a timing issue because the column will not yet be visible, so you might have to use a BeginInvoke.

Reply Children
No Data