Results 1 to 5 of 5

Thread: [2008] Paging solution for datagridview

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    [2008] Paging solution for datagridview

    I need to quickly fill a datagridview but there are over 10,000 records.

    What is the best paging solution to use in cases like these ? Should I use a backgroundworker ?

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

    Re: [2008] Paging solution for datagridview

    Paging implies not retrieving all the data until it's needed, i.e. a page at a time. The DataGridView has a VirtualMode property. You should read the documentation for that to see how it's done and whether that's what you actually want.
    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
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Paging solution for datagridview

    Thank you very much for the pointers. Virtual mode with just-in-time loading seems suitable.

    Is it then necessary to use a backgroundworker to load the datagridview ?

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

    Re: [2008] Paging solution for datagridview

    Quote Originally Posted by Xancholy
    Thank you very much for the pointers. Virtual mode with just-in-time loading seems suitable.

    Is it then necessary to use a backgroundworker to load the datagridview ?
    Nope. The idea is that you only load one page of data at a time, so each individual page loads quickly, instead of loading all the data in one go, which would take longer.
    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

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