Saturday, December 6, 2008

To Show Tooltip during mouseover of GridView

Hi,
During mouseover, we can dynamically bind the tooltip for the GridView using Javascript.
Download :http://www.walterzorn.com/tooltip/tooltip_e.htm (Javascript:tip_centerwindow.js,wz_tooltip.js)

Include necessary Javascript file and CSS,
In the GridView use the following coding in the ItemTemplete,
Inside Div tag include the following
"style="cursor:pointer;" onmouseover="Tip('<%#DataBinder.Eval(Container.DataItem,"sname")%>', BORDERWIDTH, 1, BGCOLOR, '#f3e0f3', FONTWEIGHT, 'bold', FONTCOLOR, '#00AA00',BORDERCOLOR,'black')" onmouseout="UnTip()"><%#DataBinder.Eval(Container.DataItem,"sname")%>"

No comments: