473,507 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1831

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

Similar topics

2
1740
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
7789
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
1902
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
2143
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
2220
by: Barbara | last post by:
Is there a way to override scrollbar paint method? Thx
0
2454
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
1821
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
3704
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
1100
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
352
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
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.