Tooltips on datagrid titles

S

Stevie_mac

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
 
S

Saravana

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
 
S

Stevie_mac

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top