Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid image mouseover tool tip 1

Status
Not open for further replies.

clanm

Programmer
Dec 26, 2005
237
US
I have a help icon next to my header text in my datagrid(v1.1). What I can't get to work is the mouseover and onmouseout events for the help icon image.

Here's the way the HTML sits w/o any mouseover code:
<asp:TemplateColumn HeaderText="EV Method <IMG src=images/help_red_dgheader.gif></IMG>"
HeaderStyle-VerticalAlign="Middle">

For any of my buttons of other help icons, here's the code <asp:Image id="Image2" runat="server" ImageUrl="images\question_mark_30x30.png" BackColor="Transparent"
Visible="True" EnableViewState="False" onmouseover="ddrivetip('To enter a person, ...begin typing the new name value.', 400)"
onmouseout="hideddrivetip()">
</asp:Image>

I tried the following too, but get a script error of unterminated line:

<asp:TemplateColumn HeaderText="EV Method <IMG src=images/help_red_dgheader.gif onmouseover=ddrivetip('Begin typing the new name value.', 400)
onmouseout=hideddrivetip()></IMG>"
HeaderStyle-VerticalAlign="Middle">

I've tried using the \ to get the javascript to use the double quotes, but had no luck.

Thanks!
 
it's probably a problem in one of the scripts that you are using for onmouseover or onmouseout
 
<asp:TemplateColumn HeaderText="EV Method <IMG src=images/help_red_dgheader.gif onmouseover=\"ddrivetip(\'Begin typing the new name value.\', 400)\" onmouseout=\"hideddrivetip()\"></IMG>" HeaderStyle-VerticalAlign="Middle">

gives me a parse error of:
Parser Error Message: System.Web.UI.WebControls.DataGridColumnCollection must have items of type 'System.Web.UI.WebControls.DataGridColumn'. 'HeaderStyle' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'
 
This worked:

<HeaderTemplate>
<table>
<tr>
<td onmouseover="alert('This help menu can describe the methods.\n1. Number one is this!\n2. Number two is this!');">
<font color="#FFFFCC" style="FONT-WEIGHT: bold; font-Size: 8pt">EV Method</font> &nbsp;
<img src="images/help_red_dgheader.gif"/>
</td>
</tr>
</table>
</HeaderTemplate>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top