Home Forums WinForms controls Xceed Grid for WinForms Programmatic cell selection

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17144 |

    This seems like a simple problem but I can’t find its solution in the documentation. I add a new empty DataRow to a grid. Now I want to put the cursor in (i.e., set the focus to) the first cell in that row. How do I accomplish that, programmatically?

    Thanks,

    Aaron Haspel

    Imported from legacy forums. Posted by Aaron (had 1314 views)

    User (Old forums)
    Member
    Post count: 23064

    To make the first cell of the first row active:

    this.gridControl1.CurrentCell = this.gridControl1.DataRows[0].Cells[0];

    If the gridControl1 is not the active control, you will have to make it active using:

    this.gridControl1.Focus();

    Imported from legacy forums. Posted by Ghislain (had 1372 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.