CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2011
    Posts
    4

    Question Showing large data from file in GridView and customizing cell style single/group

    Hi all,
    Microsoft Excel can't show large amount of tabular data for example > 1000*1000
    I want to show larger tabular data and then like in excel formating their cells and save and load it.
    but here mathematical calculations are not needed and just style should be save and load.
    my idea is using data gridview

    but there are some questions :
    1. Can bind very large file to datagridview?! and then user doesn't feel borely when scroll on it( how much delay for loading data)?
    2. Can assign styling format to each cell or grouping of cells alike excel for example font, forecolor, backcolor and borders?!
    3. now can save and load it's display style?

    Data are Integers ...

    excuse me for poor english writing and please help me
    Thnks

  2. #2
    Join Date
    Sep 1999
    Posts
    137

    Re: Showing large data from file in GridView and customizing cell style single/group

    This problem often comes up in database applications. It is best not to display the data from a large database table all at once in a grid control. As you were thinking, the delay for loading data becomes large. Also it uses lots of memory, and increases the load on the database server and the network.

    Instead, it is better to display a subset of the data, perhaps 100 rows at a time. As the user scrolls up or down, change which 100 rows are visible.

    You can see a different solution to a similar problem in MapQuest. If you look at a neighborhood, only a small part of the world is shown, but it is shown with lots of detail. If you zoom out, you still see about the same amount of data. The area is larger, but there is less detail.

  3. #3
    Join Date
    Feb 2011
    Posts
    4

    Question Re: Showing large data from file in GridView and customizing cell style single/group

    I know that, and I want to use it for my project,
    of course datagridview cant load more than almost 65536 cell at once. and I need to use your solution but how can I notify when user scroll?
    this means what event done when user scroll datagridview?

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Showing large data from file in GridView and customizing cell style single/group

    Usually, user clicks a button, which produces a response that you can use
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Feb 2011
    Posts
    4

    Question Re: Showing large data from file in GridView and customizing cell style single/group

    What event has be done exactly when a user click on scrolling button?

  6. #6
    Join Date
    Feb 2011
    Posts
    4

    Re: Showing large data from file in GridView and customizing cell style single/group

    datagridview itself has Scroll event and this can be a way!
    but still there are some questions!

    Can assign styling format to each cell or grouping of cells alike excel for example borders?!

  7. #7
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Showing large data from file in GridView and customizing cell style single/group

    Using code, yes
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Tags for this Thread

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

Featured