在gridview中显示鼠标悬停的工具提示 [英] Show tool tip on mouse over in gridview

查看:72
本文介绍了在gridview中显示鼠标悬停的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我需要在MouseOver的Gridview中进行工具提示。



因为我有列名称为天数,因为它具有MTW TH FS Su。

因此当用户将鼠标指针保持在本周时,它必须显示为星期一,星期二,星期三等等的星期五......等等。 br />


这是我试过的代码。



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.

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,

推荐答案

看这个 - > 如何在鼠标悬停时在gridview行中显示工具提示文本? [ ^ ]
Look This -> How to show tooltip text in gridview row on mouseover?[^]


这篇关于在gridview中显示鼠标悬停的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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