Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Frnds,

I need TOOL TIP in Gridview on MouseOver.

as i have Column name with Days in that it has M T W TH F S Su.
so when the user keep the mouse pointer on this Week days it must show as
M for Monday , T - Tuesday, W -Wednesday...etc etc.

This is my code what i have tried.

C#
protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
   {
       if (e.Row.RowType == DataControlRowType.DataRow)
       {
           string Days_t = e.Row.Cells[9].Text;
           if (Days_t == "M")
           {
               e.Row.Cells[9].ToolTip = "Monday";
           }
           else if (Days_t == "T")
           {
               e.Row.Cells[9].ToolTip = "Tuesday";
           }
           else if (Days_t == "W")
           {
               e.Row.Cells[9].ToolTip = "Wednesday";
           }
           else if (Days_t == "Th")
           {
               e.Row.Cells[9].ToolTip = "Thursday";
           }
           else if (Days_t == "F")
           {
               e.Row.Cells[9].ToolTip = "Friday";
           }
           else if (Days_t == "S")
           {
               e.Row.Cells[9].ToolTip = "Saturday";
           }
           else if (Days_t == "Su")
           {
               e.Row.Cells[9].ToolTip = "Sunday";
           }
       }
   }


But this code unable to workout please anyone can solve this doubt.

Thanks,
Posted
Updated 10-May-17 5:17am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900