Results 1 to 2 of 2

Thread: [RESOLVED] [2005] Data Grid

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    133

    Resolved [RESOLVED] [2005] Data Grid

    Hello,

    I am adding rows to a data grid dynamically. I can automatically highlight the last row added, but when it gets down to the point where the scroll bar becomes visible, it doesn't automatically scroll down to the last row i have added/highlighted. Is there a way to automatically scroll down within the data grid using code?

    I did a search and found a class to use, but i'm having trouble implementing it with 2005. Any examples would be greatly appreciated. Thank You!

  2. #2
    Lively Member
    Join Date
    Apr 2006
    Location
    Local
    Posts
    112

    Re: [2005] Data Grid

    try something like this.....

    VB Code:
    1. Me.DataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
    2.  
    3. Dim row As String() = {"1234", "5678", "9012", "3456"}          
    4.  
    5. Me.DataGridView1.Rows.Add(row)
    6. Me.DataGridView1.CurrentCell = DataGridView1.Item(0, DataGridView1.RowCount - 1)

    Cheers
    Microsoft Visual Basic 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width