473,320 Members | 1,856 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.

Tooltips on datagrid titles

I'm probably missing something real easy here but...
How do i set Tooltips to the header cells in a datagrid?

Detail...
Datagrid is databound, using non template named columns with 'Create columns
at Run Time' disabled.

PS,
i know i can set Tooltips to the cell/rows of the datagrid in the
ItemDataBound event - but can't seem to get to the header cells!
also, i know i can make template columns & set the tooltip directly to the
'label' in the header but i just don't wanna!

Many thanks, in advance - Stevie_mac
Nov 17 '05 #1
2 4729
You can set tootip to datagrid header by writing itemcreated event handler,
you can get header item in this event handler and then set the tool tip for
each columns. For example,
Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

If e.Item.ItemType = ListItemType.Pager Then

e.item.cells(0).tooltip = "tooltip msg"

..................

end if
end sub
--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.
"Stevie_mac" <no******@please.com> wrote in message
news:bf*********@newsg4.svr.pol.co.uk...
I'm probably missing something real easy here but...
How do i set Tooltips to the header cells in a datagrid?

Detail...
Datagrid is databound, using non template named columns with 'Create columns at Run Time' disabled.

PS,
i know i can set Tooltips to the cell/rows of the datagrid in the
ItemDataBound event - but can't seem to get to the header cells!
also, i know i can make template columns & set the tooltip directly to the
'label' in the header but i just don't wanna!

Many thanks, in advance - Stevie_mac

Nov 17 '05 #2
Thanks man,
I knew it would be something simple, only I didn't think it would be that
obvious. DOH!

"Saravana" <sa******@sct.co.in> wrote in message
news:#F*************@TK2MSFTNGP11.phx.gbl...
You can set tootip to datagrid header by writing itemcreated event handler, you can get header item in this event handler and then set the tool tip for each columns. For example,
Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

If e.Item.ItemType = ListItemType.Pager Then

e.item.cells(0).tooltip = "tooltip msg"

..................

end if
end sub
--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.
"Stevie_mac" <no******@please.com> wrote in message
news:bf*********@newsg4.svr.pol.co.uk...
I'm probably missing something real easy here but...
How do i set Tooltips to the header cells in a datagrid?

Detail...
Datagrid is databound, using non template named columns with 'Create

columns
at Run Time' disabled.

PS,
i know i can set Tooltips to the cell/rows of the datagrid in the
ItemDataBound event - but can't seem to get to the header cells!
also, i know i can make template columns & set the tooltip directly to the 'label' in the header but i just don't wanna!

Many thanks, in advance - Stevie_mac


Nov 17 '05 #3

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

Similar topics

1
by: David Ei | last post by:
I'm working on a C# Windows Forms application that is leaking memory. I've been using the SciTech NetMem Profiler 2 (A really great tool, BTW) to track down leaks. I've found one related to...
1
by: Wayne Aprato | last post by:
Tooltips in Access have not worked on my machine for a long time despite several reinstalls of the operating system and applications at fairly regular intervals. I have finally pinned down the...
1
by: zlf | last post by:
Hi all, I need to show a matrix in DataGrid. So both column title and row title need to be set. I wonder how to set row title in DataGrid? Thanks zlf E.G: Task/Product P1 P2 P3 T1 ...
1
by: Steve Chatham | last post by:
Is it possible to have tooltips for each of the sortable columns in a datagrid, or are you stuck with having only the 1 tooltip for the entire datagrid? SC
7
by: DC Gringo | last post by:
I have a datagrid that won't sort. The event handler is firing and return label text, just not the sort. Here's my Sub Page_Load and Sub DataGrid1_SortCommand: -------------------- Private...
1
by: Sandy | last post by:
If I have two tables i.e. Authors and Titles from Pubs, and I want to display the Authors name and then all titles by a particular author in a DataGrid, how would I do that? Is there a way to...
2
by: tshad | last post by:
I have a Datagrid that has no rows in it, but I want the title to show, and they aren't. Is there a way to make them visible even if the Datagrid is empty? Thanks, Tom
0
by: bh | last post by:
Using the pubs database, for testing, and example, I'm trying to bind a datagrid that draws data from multiple tables to use for updating multiple rows at once. For my example, I want to display...
0
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
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: 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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.