How to select datagrid cell

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.
 
J

Jose Fco Bonnin

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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top