473,473 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataGrid OnPaintBackground not working

My override of DataGrid's OnPaintBackground gets called,
but the final display only shows whatever was set in
BackgroundColor. Why is DataGrid repainting the
background after my override?
Nov 15 '05 #1
2 1896
need to see some code to help on this one

Marco
"Ma*********@hill.af.mil" <an*******@discussions.microsoft.com> wrote in
message news:0b****************************@phx.gbl...
My override of DataGrid's OnPaintBackground gets called,
but the final display only shows whatever was set in
BackgroundColor. Why is DataGrid repainting the
background after my override?

Nov 15 '05 #2
After more pushing and shoving I was able to handle my
painting needs in the OnPaint method for the DataGrid
which appears to be one of the last paint methods called
(after DataGridColumnStyle, etc.). Conclusion, it
appears that the OnPaint method redraws over whatever the
OnPaintBackground painted, unless I'm misunderstanding
what OnPaintBackground is supposed to do.
-----Original Message-----
need to see some code to help on this one

Marco
"Ma*********@hill.af.mil" <an*******@discussions.microsoft.com> wrote inmessage news:0b****************************@phx.gbl...
My override of DataGrid's OnPaintBackground gets called, but the final display only shows whatever was set in
BackgroundColor. Why is DataGrid repainting the
background after my override?

.

Nov 15 '05 #3

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

Similar topics

4
by: Stephen | last post by:
I have got an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I...
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
3
by: Brad | last post by:
I'm working with a DataGrid in C#, and the user needs to be able add and remove columns from the DataGrid on the fly, without opening and closing the form. The scenario is this. I have a setup...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
4
by: Anthony | last post by:
Hi Folks, I'm adding some columns to my datagrid which are of Combo Box type. I'm inheriting DataGridTextBoxColumn and doing all the usual stuff to get them populated. This is working fine. I...
1
by: Robert Smith | last post by:
Hello, I have an application with forms diplaying the Office2003 backcolour. However when these forms are loaded the controls are loaded and then the painting of the backcolor is done later on...
5
nmm32
by: nmm32 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. I have another procedure which adds another row to the...
0
by: cms3023 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. The table inside the database has data that matches with...
0
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
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...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.