Populating a grid

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2009
Posts: 7
Reputation: edi843 is an unknown quantity at this point 
Solved Threads: 0
edi843 edi843 is offline Offline
Newbie Poster

Populating a grid

 
0
  #1
May 4th, 2009
I am populating a grid using Arraylist. First i get tha data from the database and populate the ArrayList. then i give this ArrayList, like datasource to the grid. For a little amount of data i think is ok. I think may be a problem with a big amount of data. So i am asking if there is any technique to get a big amount of data to the array list and then populate the grid, without having big delays. I know that the question is very general, but however, i will be greatfull for any answer. (the aplication is a web application)
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,612
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Populating a grid

 
0
  #2
May 4th, 2009
In my experience, a large amount of data will slow down the grid regardless. Perhaps if you have that much data, you should page it so that only a fraction (one page) is loaded and visible at one time. Then you can divide the data into pages such that the grid is zippy all of the time.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 7
Reputation: edi843 is an unknown quantity at this point 
Solved Threads: 0
edi843 edi843 is offline Offline
Newbie Poster

Re: Populating a grid

 
0
  #3
May 4th, 2009
i understand what you say, but however, at first i have to get all the data from the database or no?! In this manner the only thing that make it faster is not the communication with tha database but the displaying the data on the grid. You think, that takeing for example 5 000 records from the database will not make delays ?!!
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,612
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Populating a grid

 
0
  #4
May 4th, 2009
>In this manner the only thing that make it faster is not the
>communication with tha database but the displaying the data on the grid.
Correct. Adding and displaying the data will likely be your bottleneck, unless the database design is so mucked up that selecting 5,000 records takes any noticeable amount of time. But in that case your problem has nothing to do with C#.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC