Datagridview, ensure last row visible

Posted on 2012-08-11
Last Modified: 2012-08-11
Hi Experts,

How to make the newly added row in a datagridview visible.
I have tried:
datagridview1.Rows(datagridview1.Rows.Count - 1).Selected = True.
But the last row is not in view once the vertical scrollbar appear.

(In vb6, there is a function called EnsureVisible for ListView:
Question by:LoGa1234567890
    1 Comment
    LVL 83

    Accepted Solution

    Datagridview has the firstdisplayedscrollingrowindex property which you can set to force it to scroll down.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now