Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display Tooltip on GridView Row Hover

I need to show a tooltip when mouse is placed on GridView Row (onmouseover) I need to set the Tooltip content Dynamically in GridView_RowData

How can I Do this??

Can I Do this in e.Row.Attributes.Add(... ??

like image 905
Krishna Thota Avatar asked Oct 31 '12 08:10

Krishna Thota


1 Answers

Try it like this...

protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        //use this way
        e.Row.ToolTip = "My FooBar tooltip";
         //or use this way
        e.Row.Attributes.Add("title", "My FooBar tooltip");
    }
 }

This will show tooltip for entire row..If you need to show on a particular control then find that control and set is Tooltip attribute to your own title...

like image 70
Mayank Pathak Avatar answered Nov 12 '22 03:11

Mayank Pathak