|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to select the newly added row in datagridviewI 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. 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) -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "mike" <mikekimh***@gmail.com> wrote in message news:1152721379.160327.133080@35g2000cwc.googlegroups.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. >
Validating textbox w/ Cancel button
sql server 2005 tools configuration starts when I build a distribution project (VB 2005) for next problem Delegate et al Outlook Add In suddenly stops loading Referring form objects in VB 2005. TypeForwardedToApp attribute. Replacement for Inet Control text justification in excel Determine projects in solution within VS2005 macro |
|||||||||||||||||||||||