Home All Groups Group Topic Archive Search About

DataGridView : active-row versus Selected-row ???

Author
13 Mar 2006 10:06 AM
cc
Hi,

using the DataGridView (.NET 2005) :
after I fill the Grid with some records is the first record highlighted
(selected).

When I programmatically select the 2nd row in the Grid and deselect the
first one by executing
  dataGridView1.Rows[0].Selected = false
  dataGridView1.Rows[1].Selected = true

is the activerow still the first one.
Can be seen because of the triangle that is shown in the Grid in front of
the first row.

How can I set the 2nd row as activerow ?

thnx
Chris

Author
13 Mar 2006 7:11 PM
Cor Ligthert [MVP]
cc.

Assuming that you mean active cell

Be aware that it is Column Row,

http://msdn2.microsoft.com/en-us/library/yc4fsbf5.aspx

I hope this helps,

Cor