Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a fast WPF Datagrid control from scratch?

I have been using a number of commercial WPF datagrids in the past and I must say the performance has been quite disappointing and slow. I would like to be able to load up up to a million records and be able to scroll up and down fast without any lag.

I have been told by some Guru WPF developers that it is indeed possible to create a WPF Datagrid from scratch - with far less features than the commercial ones - focused mainly on performance.

But how would I proceed? I have been told developing these datagrids should not be built in the usual way of utilizing the ItemsControl, which leads to the same performance problems as the existing wpf grids.

Is a Guru here to point me into the right direction?

Update:

Because one person mentioned the doubt of needing one million records, now too many are jumping on the same bandwagon. What I am interested in is creating a low latency fast Datagrid with barely any feature, which can hold in theory up to a million record.

I dont require any sorting, filtering or else, all I need is speed. And thats where I needed guidance from a Guru. I know what Data Virtualization is, its just not enough.

like image 584
Houman Avatar asked Mar 25 '11 16:03

Houman


1 Answers

I suspect that you want to look at the VirtualisingStackPanel as part of your implementation, it only renders controls as they become visible.

However, a million records sounds like too many for any user to seriously need on screen at any one time. I'd seriously rethink my UI design but that's just me.

like image 136
BenCr Avatar answered Nov 10 '22 12:11

BenCr