tags:

views:

2257

answers:

5

Hi all,

I have a program that loads 10,000 rows into a datagrid and the datagrid can be slow to render/paint and occassionally doesn't display, you can tell it has loaded with data but the grid goes blank. I was thinking of replacing the datagrid with DevExpress XtraGrid, has anyone used this and can I expect it to render/paint quicker?

Thanks

PS This is a win form app, there are probably less than 10,000 rows in reality but safe to say a lot. I suspect we need to use paging maybe?

A: 

I'm fairly certain that you won't notice a significant improvement by switching. I think the problem is the sheer amount of data you are pushing into the grid (and thus down to the browser).

Can you page this data, or do all 10000 rows have to be on a page? If its the latter, I would consider using a repeater control. If paging is an option, I would suggest pushing the paging back to the data source.

Either should garner you a decent improvement.

3rd party grids can make ajax updates and db-side paging easier, but there is a big learning curve with each one, and formulating the right query isn't that hard if you want to do it in plain old .net.

BnWasteland
It's a Winform application, not a web application.
Daniel Brückner
A: 

First off, make sure you are using Virtual Mode with your GridView

From Data Display Modes in the GridView Control:

The primary use of virtual mode ... is to optimize performance when interacting with large amounts of data.

MSDN has a tutorial to get you started...

Daniel LeCheminant
A: 

My first spontaneous thought is that it doesn't matter which grid is faster, since 10000 rows in a grid in a user interface feels like an error in itself. But then again I don't know what the application does so it may make sense in the context in which is it used...

Fredrik Mörk
A: 

We use the standard DataGridView with hundreds of thousands of rows and dozens of columns with instantaneous performance, no problems at all. In Virtual Mode. Use Virtual Mode.

http://msdn.microsoft.com/en-us/library/2b177d6d.aspx

Corey Trager
A: 

Anyone that is looking for a good alternative to the standard datagrid should give SourceGrid a try, it is free and quite well done.

Snooze