473,383 Members | 1,813 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,383 software developers and data experts.

how to add a tooltip a the datagrid header?

hello,
I'm trying to add a tooltip at the datagrid header but
I don't know where to start?

I tought about a template column
but i only wish to have the tooltip on the header?

any help?
thank you
Nov 19 '05 #1
3 2628
In the ItemCreated event for the datagrid, check for e.ItemType

If e.ItemType = ListItemType.Header, then simply do this:

e.Item.Cells(0) = "Id"
e.Item.Cells(1) = "Name"
e.Item.Cells(2) = "Cigarettes Per Day"

HTH
S.M. Altaf
[MVP - VB]
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"Franck" <fh@fh.com> wrote in message
news:di**********@s1.news.oleane.net...
hello,
I'm trying to add a tooltip at the datagrid header but
I don't know where to start?

I tought about a template column
but i only wish to have the tooltip on the header?

any help?
thank you

Nov 19 '05 #2
thanks a lot!
:)
S.M. Altaf [MVP] wrote:
In the ItemCreated event for the datagrid, check for e.ItemType

If e.ItemType = ListItemType.Header, then simply do this:

e.Item.Cells(0) = "Id"
e.Item.Cells(1) = "Name"
e.Item.Cells(2) = "Cigarettes Per Day"

HTH
S.M. Altaf
[MVP - VB]
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"Franck" <fh@fh.com> wrote in message
news:di**********@s1.news.oleane.net...
hello,
I'm trying to add a tooltip at the datagrid header but
I don't know where to start?

I tought about a template column
but i only wish to have the tooltip on the header?

any help?
thank you


Nov 19 '05 #3
You can handle the DataBound event on the DataGrid. This is fired after each
row is created. The event is passed the row that was just created so you
can see if it's the header row. If it is, then you can drill into its Controls
collection and then modify them however you want (by adding the tooltip via
an attribute).

-Brock
DevelopMentor
http://staff.develop.com/ballen
hello,
I'm trying to add a tooltip at the datagrid header but
I don't know where to start?
I tought about a template column
but i only wish to have the tooltip on the header?
any help?
thank you

Nov 19 '05 #4

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

Similar topics

1
by: Stephen | last post by:
Is it possible to add a tooltip in the column of a Datagrid. Can someone please show me how I would do this for the datagrid column below. Thanks for any help anyone can give me. Here is the...
2
by: Stephen | last post by:
I'm trying to work with a datagrid column in order to display a tooltip in a datagrid cell. The reason I am doing this is because I have some long strings being returned and I don't want the rows...
4
by: JerryP | last post by:
Hi Group, Id like to have a tooltip for each col in the datagrid. Is there a way to do that ? Thanks ! Jerry
2
by: | last post by:
I have a datagrid on a web page that has several columns in it. Is there a way to provide a tooltip for each of the columns (i.e. to say how they were calculated or what a specific literal in the...
1
by: Mark | last post by:
I have a simple DataSet with a single table being bound to a DataGrid. One of the columns is displaying a linkbutton or button so that the user can "drill through" to another related report. I...
1
by: Lars Netzel | last post by:
I need to have a Tooltip on each Cell in a datagrid, I don't know how to do this. I'm using Styles to the datagrid (Which I asume most people do since you never need to show all the fields from the...
3
by: Craig G | last post by:
what way do you code it? i tried the following but it wouldnt display it lblAdd_info is a hidden field in the cell itself that contains the data i want to display in the tooltip text. i added the...
5
by: Lars Netzel | last post by:
I need to have a Tooltip on each Cell in a datagrid, I don't know how to do this. I'm using Styles to the datagrid (Which I asume most people do since you never need to show all the fields from the...
2
by: geronimi | last post by:
I want a tooltip (in an item in a datagrid) to stay for more then 5 seconds (standard) visible, Do I have to write my own Toolip or can I change a setting somewhere to increase the tooltip visible...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.