How to select datagrid cell

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

This sounds very simple, but I'm having trouble getting it to work.
When I display a WinForms datagrid, I want the value in the first row
and column to appear in reverse image. I have tried setting the
CurrentCell, focusing the grid, getting the textbox and tried to select
the text, etc. Each time with no luck. When I press the Tab key to
tab through the cells, then the cells are reverse-imaged. But I need
it that way on initial display.
 
Steve said:
This sounds very simple, but I'm having trouble getting it to work.
When I display a WinForms datagrid, I want the value in the first row
and column to appear in reverse image. I have tried setting the
CurrentCell, focusing the grid, getting the textbox and tried to select
the text, etc. Each time with no luck. When I press the Tab key to
tab through the cells, then the cells are reverse-imaged. But I need
it that way on initial display.

After load the data you only need to do

this.datagrid.Select();
 
Back
Top