Tooltip for Datagrid.

R

Rudy Mark

Is it possible to have separate tooltip for each of the column in datagrid ?
Thanks,
Rudy
 
K

Ken Cox [Microsoft MVP]

Hi Rudy,

You can add a tooltip to any column item that accepts a tooltip as long as you
can get hold of the object:


Private Sub DataGrid1_ItemCreated _
(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) _
Handles DataGrid1.ItemCreated
Dim btnAdd As New Button
If e.Item.ItemType = ListItemType.AlternatingItem Or _
e.Item.ItemType = ListItemType.Item Then
btnAdd = e.Item.FindControl("Button1")
btnAdd.ToolTip = "This control's index is " & _
e.Item.ItemIndex.ToString
End If
End Sub


--

Help stop SWEN in the newsgroups - Get the W32.Swen.A@mm Removal Tool:
http://securityresponse.symantec.com/avcenter/venc/data/[email protected]



Is it possible to have separate tooltip for each of the column in datagrid ?
Thanks,
Rudy
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top