473,399 Members | 2,159 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,399 software developers and data experts.

Datagrid: Individual forecolors in columnheaders

Hi everybody,

in my datagrid I want to show the text in the columnheaders working as a
linklabel.
It is already working, doing different things depending on the
colheader, which has been clicked on.

But I'm only able to change the forecolor and font of all columnheaders
at one time (to simulate the linklabel behaviour).

What I now want is to set the color to blue (and font underlined) for
only one columnheader, when the mouse is moving over.

Nor was it possible for me to access the forecolor property of a
baseclass, either I could access the whole control (which should be of
label kind) by runnig through the subcontrols of the datagrid.

Thanks a lot for any help, hints or links,

regards,
Martin.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
2 1280
just a thought . . .

How about adding controls to the datagrid to be positioned over the column
headers. This way you can set up and event handler for those controls and
pass the message to the underlying control as required.

;-D

--
Regards - One Handed Man

Author : Fish .NET & Keep .NET
=========================================
This posting is provided "AS IS" with no warranties,
and confers no rights.
"Martin Wolff" <ma***@111.com> wrote in message
news:uI*************@tk2msftngp13.phx.gbl...
Hi everybody,

in my datagrid I want to show the text in the columnheaders working as a
linklabel.
It is already working, doing different things depending on the
colheader, which has been clicked on.

But I'm only able to change the forecolor and font of all columnheaders
at one time (to simulate the linklabel behaviour).

What I now want is to set the color to blue (and font underlined) for
only one columnheader, when the mouse is moving over.

Nor was it possible for me to access the forecolor property of a
baseclass, either I could access the whole control (which should be of
label kind) by runnig through the subcontrols of the datagrid.

Thanks a lot for any help, hints or links,

regards,
Martin.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2

Thanks, for your answer.

I still thought about that way.

But if it is possible to access a single header control directly, I
would prefer to do so.

Anyhow,

waiting for new suggestions,
Martin.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

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

Similar topics

0
by: Bob Rosen | last post by:
The description given in "Customizing Items Dynamically in the DataList or DataGrid Web Server Control" (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbCode/...
0
by: DraguVaso | last post by:
Hi, I want to customize my DataGrid (for VB.NET) a little bit by adding an image to my columnHeaders etc. I need to override the Paint-event of it, but the problem is: I don't know from which...
0
by: Adam | last post by:
Hi How I can control Column Headers in the Microsoft ListView by VBA I can add Private Sub ListView_Click() Dim lv As MSComCtlLib.ListView Set lv = Me.ListView.Object With lv '.ColumnHeaders =...
0
by: sunil | last post by:
Is there a way i can enable rowheaders and columnheaders(which are like button) on a datagrid control. Appreciate any help. Thanks
5
by: EMW | last post by:
Hi, On my quest to learn more about VB.NET I'm again stuck with some questions.... I've got a filled datagrid (filled from an Excel file) and the column headers have the same name as in the...
1
by: Jabco | last post by:
I need a grid that displays hierachical related tables. The grid's DataSource is a dataset. Maybe there is a better way I don't know. There are 2 tables in the dataset. They have a Relations on...
1
by: simchajoy2000 | last post by:
Is it possible to allow users to edit datagrid columnheader names during run-time? And it is possible to create "header names" for rows in a datagrid as well? Thanks!! Joy
1
by: Familjen Karlsson | last post by:
Hi I want to add columns in a Datagrid and I want the Columnheaders to show and empty cells to show without adding any records. For example, sometimes there aren 't any records in the database,...
1
vdraceil
by: vdraceil | last post by:
Is it possible to set different forecolors to different words in a text(within a textbox)?If not possible in a textbox then is it possible in a rich text box or any other activex component?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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
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...
0
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...

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.