473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

overriding DataGridTextBoxColumn Paint -> Any idea to be faster?

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
Jul 26 '05 #1
0 1819

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Job Lot | last post by:
I am customizing DataGridTextBoxColumn. How can I access properties in DataGrid to which custom DataGridTextBoxColumn will be added. Say for instance, how I would access SelectionBackColor...
3
by: Cheng Mo | last post by:
When overriding operator new & delte of one class, the method is implicitly declared as static. However, overriding operator new & delete of template cannot be static.The compiler says cannot...
1
by: Jaco Karsten | last post by:
I am writing a customized DataGrid control which will allow the user to only select an entire row (and not a cell inside the row). So I want to add readonly columns to the datagrid. To achieve...
0
by: Jax | last post by:
I am using a class that inherits from the DataGridTextBoxColumn. It adds a combo box into the column where it displays a selection of choices. The problem I have is that when this comboBox loses...
0
by: Barbara | last post by:
Is there a way to override scrollbar paint method? Thx
0
by: JMarques | last post by:
I have one DataGrid with one column colPWD, and the code DataGridTableStyle dgStyle = new DataGridTableStyle(); DataGridTextBoxColumn colPWD = new DataGridTextBoxColumn(); colPWD.MappingName =...
5
by: Datagridtextboxcolumn not firing event | last post by:
"PLEASE HELP, I NEED HELP N O W !!!" AddHandler dgtxtboxcolumn.textbox.KeyDown, AddressOf TextBoxKeyPress Private Sub TextBoxKeyPress(ByVal sender as Object, ByVal e as KeyEventArgs) End...
4
by: RSH | last post by:
I tried an implementation of overriding a ComboBox control. I am simply trying to avoid it repainting, but I can't seem to get it to work. What am I doing wrong? Please help. Thanks, Ron
0
by: Greg | last post by:
I've made a standard datagrid multi line. However, the mutiple lines of text are only visible when a row is selected. This is a common issue and the solution offered is always to override the...
4
by: arlef | last post by:
Hi, Is there a wizard or something that helps with overriding methods? For Instance, I want to override the paint method of a Windows.Forms.Panel. do I have to manually type the override paint...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.