Hi,
I 'wrote' my own DataGrid, using the normal DataGrid, and overriding some of
the DataGridTextBoxColumn-methods (mostly the Paint-method). I based most of
my changes on the Windows Form FAQ:
- http://www.syncfusion.com/FAQ/Window...44c.aspx#q745q
- http://www.syncfusion.com/FAQ/Window...44c.aspx#q758q
- http://www.syncfusion.com/FAQ/Window...44c.aspx#q837q
Basicly it works like this: Every time a cell has to be painted, it throws
an Event with an custom EventArgs-object. In that Event the specific
property's of that cell are defined and returned to my Paint-method, who
paints the cell as wanted.
I have now behaviours like:
- Custom painted column- and row-headers (image, border, color, background,
....)
- bold/underlinded/italic text, backgroundimage, pictures, masks, ... for
each cell, depending on it's value or another value in that row etc.
The problem is: During the last year I added some new behaviours for each
new project. But it becomes slower and slower... Scroling trough the
DataGrid takes much more time than through a normal DataGrid. this isn't
abnormal offcource, because on every Paint and for every Cell an event is
thrown, and the whole logic has to be redone (checking values, select case,
if then, selecting images... etc), even if the properties of the Cell
remains the same.
So my question is: Does anybody has any idea how I could make this stuff
faster? And how to see which parts cost the most time? I alreaddy tried to
look with a Now.Tick at the beginning and the end of a function to see if it
took long time or not, but I was really surprised to see that the difference
between the ticks before and after the method was zero!
I also tried to put every Event-Args in a 2-dimensional array (for each cell
one), but even this didn't give me a noticaable difference in eprformance...
Can anybody help me? I really like my customized DataGrid, but it's really
on the edge of useable now... :-/
thanks a lot in advance,
Pieter