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)

Recommended Answers

All 3 Replies

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 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 ?!!

>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#.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.