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

Tooltip on cell in DataGrid?

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 source).

The Cell I want a tooltip on is styled with a textboxcolumn and the TextBox
Object in that TextBox Column doesn't seem to have a property called
Tooltip.. so i'm sorta stranded here...

Best regards/
Lars

Nov 18 '05 #1
1 1990
Lars, based on your post above, maybe you've already figured this out:

Private Sub grdMenu_ItemDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) _
Handles grdMenu.ItemDataBound

If e.Item.ItemType = ListItemType.AlternatingItem Or _
e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.SelectedItem Then

Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)
Dim ctl As WebControl = CType(e.Item.FindControl("lblDesc"),
WebControl)
ctl.ToolTip = drv("ExtDesc").ToString

End If

The gist is that at ItemDataBound, go get your control, and then add your
text to the tooltip property. In my case the grid shows "Description" for an
item, and I put the "Extended Description" in the tooltip.

hth,

Bill

"Lars Netzel" wrote:
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 source).

The Cell I want a tooltip on is styled with a textboxcolumn and the TextBox
Object in that TextBox Column doesn't seem to have a property called
Tooltip.. so i'm sorta stranded here...

Best regards/
Lars

Nov 18 '05 #2

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

Similar topics

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...
0
by: Stephen | last post by:
I have the following column and so far im able to bind the column to CompanyName and only return the first 50 characters. The second function i'd like to retun a tooltip for that datagrid cell but...
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: 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...
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...
4
by: John Smith | last post by:
How to add the tool tip to the datagrid column? I have a situation wherein the customer number is displayed in the datagrid column. I wanted to display the corresponding customer first and last...
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: james | last post by:
I have been looking for a way to reproduce the tooltip that Access displays when scrolling the Datagrid that shows the record count (changes as you move the thumb up or down). So far, nothing I...
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
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.