Me.DataGridView1.DataSource = dt
Me.DataGridView1.MultiSelect = False
Me.DataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
Me.DataGridView1.CurrentCell = Me.DataGridView1.Item(0, 2)
(obviosuly find the cell of the newly added row by checking the row count
of your dataset or collection that is bound)
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com
"mike" <mi*********@gmail.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
>I have a datagridview control and a button on the windows form. I am
adding a new row in button click event. When the number of rows grow,
the newly added row will not be
visible but a scroll bar will be shown.
I want the program to highlight the newly added row and make it visible
in the datagridview by scrolling to that position when a new row was
added by button click event. How can you do that? Thanks in advance.