1
Vote

FocusFirstCell doesn't work

description

grid params like so :-
        gamesGrid.SelectionMode = SourceGrid.GridSelectionMode.Row;
        gamesGrid.Selection.EnableMultiSelection = false;
        gamesGrid.ColumnsCount = 11;
        gamesGrid.FixedRows = 1;

      .... add rows

       gamesGrid.AutoSizeCells();
       gamesGrid.Selection.FocusFirstCell(true);
I am now expecting gamesGrid.Selection.ActivePosition to be the first cell, but in fact is is (-1,-1)


I have traced your source to SelectionBase.cs. if I remove the below lines, it works as expected.
            if (newCellToFocus != null)
            {
                //This method cause any cell editor to leave the focus if the validation is ok, otherwise returns false.
                // This is useful for 2 reason:
                //  -To validate the editor
                //  -To check if I can move the focus on another cell
                bool canFocus = Grid.Focus(false);
                if (canFocus == false)
                        return false;
            }
I am using your latest download 4_40

comments