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

Can you add a tooltip to a datagrid column

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 datagrid coloum which I want to put the tooltip
when the user hovers over it.

<asp:BoundColumn DataField="ID" SortExpression="ID" HeaderText="ID">
<HeaderStyle ForeColor="White" CssClass="dgHeader">
</HeaderStyle>
<ItemStyle Font-Size="10pt" Height="11px" CssClass="A">
</ItemStyle>
</asp:BoundColumn>
Jul 21 '05 #1
1 2957
this works for me

in my column, i have a headline[headline] but due to screen size
restrictions, want to show a more detailed description [body] as a tooltip

both pieces of data are returned in the dataset

NB when customising the data grid i always find i have to turn off the
'autogenerate columns' thing on the grid
<asp:TemplateColumn SortExpression="headline" HeaderText="Headline">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<a href='Single.aspx?action=VIEW&type=EXISTING&issueI D=<%#
DataBinder.Eval(Container.DataItem, "issue_id") %>'>
View</a>&nbsp; <a href='Single.aspx?action=EDIT&type=EXISTING&issueI D=<%#
DataBinder.Eval(Container.DataItem, "issue_id") %>'>
Edit</a>&nbsp;
<asp:Label ID="LblHeadline" Runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "headline") %>' ToolTip='<%#
DataBinder.Eval(Container.DataItem, "body") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>

"Stephen" wrote:
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 datagrid coloum which I want to put the tooltip
when the user hovers over it.

<asp:BoundColumn DataField="ID" SortExpression="ID" HeaderText="ID">
<HeaderStyle ForeColor="White" CssClass="dgHeader">
</HeaderStyle>
<ItemStyle Font-Size="10pt" Height="11px" CssClass="A">
</ItemStyle>
</asp:BoundColumn>

Jul 21 '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...
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
0
by: Jim Heavey | last post by:
Hello, I am looking a coding example that allows you to add toolTips to a column in a datagrid. It works just fine ins the supplied code, but when I attempt to apply it to my program, it fails...
2
by: | last post by:
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...
1
by: Mark | last post by:
I have a simple DataSet with a single table being bound to a DataGrid. One of the columns is displaying a linkbutton or button so that the user can "drill through" to another related report. I...
1
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...
3
by: Franck | last post by:
hello, I'm trying to add a tooltip at the datagrid header but I don't know where to start? I tought about a template column but i only wish to have the tooltip on the header? any help?...
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...
1
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...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.