GRIDVIEW中单元格的工具提示 [英] Tool tip for cell in GRIDVIEW

查看:86
本文介绍了GRIDVIEW中单元格的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

正在使用Asp.net,C#,SqlServer2005.

在我的网页上,我有一个GridView,在GRIDVIEW中,我有一个带DAYS的Colum名称,在那一天的列中,我将Days设置为M T W Th F S Su

这7天在一个牢房中.所以我需要一个工具提示,如果M上的MouseOver应该显示为星期一,如果T上的MouseOver必须显示这样的所有7天,则为星期二.
请帮助我我亲爱的朋友们.

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.

推荐答案


检查此
www.codeproject.com/Answers/375432/Gridview-Cells-Tool-tip-Text [^ ]
鼠标悬停在Gridview中的工具提示.帮助 [ ^ ]
最好的问候
M.Mitwalli
Hi ,
Check this
www.codeproject.com/Answers/375432/Gridview-Cells-Tool-tip-Text[^]
Tool tip in Gridview on Mouse Over.--- Need Help[^]
Best Regards
M.Mitwalli


我认为这段代码将为您提供帮助:-
假设日期列在单元格编号3中:
I think this code will help you:-
Suppose Date Column is in cell number 3:
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.


这篇关于GRIDVIEW中单元格的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆