Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear All,

Am working on Asp.net , C#,SqlServer 2005.

on my webpage I have a GridView, in that GRIDVIEW I have a Colum name with DAYS, In that Days Column I have Days as M T W Th F S Su

These 7 days are in one Cell. so I need a Tool tip for this, if MouseOver on M it should show Monday , if MouseOver on T it must show Tuesday like this for all 7 days.

Please Help me my dear Friends.

Thanks in ADVANCE.
Posted

 
Share this answer
 
I think this code will help you:-
Suppose Date Column is in cell number 3:
C#
string  Day = e.Row.Cells[3].Text;
string  Name = String.Empty;
          switch (Day)
          {
              case "M":
                   Name = "Monday";
                  break;
              case "T":
                   Name = "Tuesday";
                  break;
              case "W":
                  Name = "Wednesday";
                  break;
              case "Th":
                  Name = "Thursday";
                  break;
              case "F":
                  Name = "Friday";
                  break;
              case "S":
                  Name = "Tuesday";
                  break;
              case "Su":
                  Name = "Saturday";
                  break;
          }
          e.Row.Cells[3].ToolTip = Name;


Good luck.
 
Share this answer
 
v2

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