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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse Over/Out + DataGrid

Status
Not open for further replies.

Isadore

Technical User
Feb 3, 2002
2,167
US
I spent the better part of yesterday desiging a graphics viewing platform that consists of a single column datagrid on the left, and image tag on the right. In ChartDirector I put all the *.png files in Session so I can call them up when the Mouse over event is put in. Idea is to roll over the datacolum and change images.

Image of the platform can be seen at:


Two attractive starting points, both from Tek-Tips include:

<asp:HyperLinkColumn DataNavigateUrlField=&quot;ID&quot; DataNavigateUrlFormatString=&quot;javascript:MyPage_window=window.open('MyPage.aspx?ID={0}','MyPage_window','width=700, height=475');Transaction_window.focus()&quot; DataTextField=&quot;ID&quot; DataTextFormatString=&quot;View&quot;></asp:HyperLinkColumn>

...which has a Javascript call within the hyperlink column of a Grid, same condition I am facing. Zarcom added a modification, calling for an Item Template, when he re-adjusted the code as follows:

<asp:TemplateColumn> <ItemTemplate>
<asp:HyperLink id=HyperLink1 runat=&quot;server&quot; Text='<%# DataBinder.Eval(Container, &quot;DataItem.Rate&quot;) %>' NavigateUrl='<%# &quot; &quot;DataItem.Rate&quot;)&&quot;&other=&quot;&DataBinder.Eval(Container, &quot;DataItem.SubClassID&quot;) %>'> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>

Gresko added:

<ASP:LABEL id=lblWording Text='<%# Convert.ToString(DataBinder.Eval(Container.DataItem,&quot;Wording&quot;)) %>' Runat=&quot;server&quot; onmouseover=alert(&quot;hi&quot;);></ASP:LABEL>

...saying that it should be no problem citing the above as an example of how easy this would be.

...Not to call for any time, but a sentence or two might set the stage for some sleep later tonite!

Thanks as always.
 
Zarc: Sorry I tortured your syntax - its all there however.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top