Home Forums WinForms controls Xceed Grid for WinForms Changing the current row Reply To: Changing the current row

User (Old forums)
Post count: 23064

Hello there..

If you still haven’t found the solution for mentioned problem here it is…

After calling MoveCurrentRow, current row is changed, but it still has to be selected:

this.gridControl1.CurrentView.IsSelected = true;

This in the other hand causes previous row to remain selected, so before MoveCurrentRow call, be sure to deselect currently selected row(s):


At the end I would also recommend to call BringIntoView method, which will bring newly selected row into visible part of the grid (important on page up, page down features).

Whole method:

        protected void MoveRowCurrentRowSelection(VerticalDirection direction)

            if (gridControl1.CurrentRow != null)
                this.gridControl1.CurrentRow.IsSelected = true;

Imported from legacy forums. Posted by Ogren (had 2629 views)