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.