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
315
Tab Order and Focus Behavior in WinGrid
posted

Hello,

I have a WinGrid with several identically configured columns of DropDown cells. When I tab into the first cell, (from a Tab control) the appearance of the cell is not like the subsequent cells.  Instead of showing the edit cursor, the first cell is outlined and shows the desired behavior only when the mouse is clicked over it.  I can't seem to find a way to activate the first cell such that the user can make a choice or enter text without resorting to using a mouse.

Any suggestions?

W. Welch

  • 469350
    Verified Answer
    Offline posted

    Hi,

    It sounds like the cell is Active, but it has not entered edit mode. The user can enter edit mode on a cell by pressing F2, I think.

    But if you don't want them to have do that, you could try this:


            private void ultraGrid1_Enter(object sender, EventArgs e)
            {
                UltraGrid grid = (UltraGrid)sender;
                if (grid.ActiveCell != null &&
                    false == grid.ActiveCell.IsInEditMode)
                {
                    grid.PerformAction(UltraGridAction.EnterEditMode, false, false);
                }           
            }

     

    This code is dependent on a number of other grid settings, though, so it might have to be modified to work in your particular application.