By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

Can you add a tooltip to a datagrid column

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.