Results 1 to 5 of 5

Thread: [2005] DataGridView Scrolling Optimization

  1. #1

    Thread Starter
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    [2005] DataGridView Scrolling Optimization

    Hi,

    I have a DataGridView where I bind a datasource (sql query) to it. The row count is high with many columns. Trying to scroll through this DGV is painfully slow.

    Does anyone know of any kinds of optimization I can do so that I can scroll faster? Like what is the DataGrid doing when you scroll? Does it repaint every screenful? Does it validate every row? It seems like it is doing something unneeded when a user scrolls.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] DataGridView Scrolling Optimization

    While I've never used it, you might want to start by reading the documentation for the DataGridView.VirtualMode property.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Addicted Member
    Join Date
    Oct 2008
    Posts
    129

    Re: [2005] DataGridView Scrolling Optimization

    sir what is the best alternative for datagridview? basing from the situation of ForumAccount?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] DataGridView Scrolling Optimization

    Quote Originally Posted by j0shua
    sir what is the best alternative for datagridview? basing from the situation of ForumAccount?
    I have no idea what you're trying to ask and I'll wager that it's unrelated to this topic. I'd suggest that you try to explain what you want more clearly and, if it doesn;t relate specifically to this topic, post it in a new thread. Just because you are asking about a DataGridView doesn't make it relevant to this topic.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Addicted Member
    Join Date
    Oct 2008
    Posts
    129

    Re: [2005] DataGridView Scrolling Optimization

    im sorry, i overlook what the thread starter posted, maybe i will just start a new thread. thank you!

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