Datagrid + Tooltip question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 column means)?

Thanks

SC
 
Sure, if you want to have decent looking popups, pick your javascript code, http://www.walterzorn.com/tooltip/tooltip_e.htm this one for example, and work it into the ItemDataBound event the datagrid uses.

If e.Item.ItemType = ListItemType.Header Then

Dim td as tableCell = ctype(e.item.cells(?), tableCell)

'whatever it takes to make html like you need it from this point

End If
 
In the itemcreated event, if the item type is header, look at the control
types. For autgenerated columns, they will be tablecells. In VB.Net, the
following code will give you access to their properties, including tooltip,
which you can just set in text:

directcast(e.Item.Controls(1),TableCell).ToolTip = "This column provides
useful information..."
 

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

Similar Threads

tooltips in datagrid? 1
Tooltip on cell in DataGrid? 1
Tooltips on datagrid titles 2
Tooltips in a boundcolumn 3
Tooltip question 5
ToolTip in a bound datagrid 1
DataList Row ToolTip 4
Tooltip question 8

Back
Top