鼠标上方的Gridview单元中需要工具提示

鼠标上方的Gridview单元中需要工具提示

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

问题描述

尊敬的专家!我正在从事铁路项目,

鼠标悬停在Gridview单元格上时需要工具提示(M T W TH F S SU)
================================================== ===================

我有一个列名为DAYS的列名称,在DATABASE存储过程的该列中显示为M T W TH F S SU ...所有这些字母都在一个单元格中.

所以我需要鼠标悬停的工具提示

当用户将鼠标置于M上时,它必须显示星期一和
T表示星期二
W为星期三
TH为星期四
F代表星期五
S为星期六
SU作为周日.

在某些单元格中显示M 0 W TH F S 0

如果它的值为0(零)....它必须显示...没有火车

请帮助我亲爱的专家.为此问题进行了很多尝试.

谢谢

Dear Experts !! am working on Railway Project,

Need Tool tip in Gridview Cell on MouseOver the Cell (M T W TH F S SU)
======================================================================

I have a column name with heading as DAYS, In that column from DATABASE Store procedure it shows as M T W TH F S SU...all these letters are in one cell.

so i need tool tip on mouse over

when user keeps the mouse on M, it must show Monday and
T as Tuesday
W as Wednesday
TH as Thursday
F as Friday
S as Saturday
SU as Sunday.

in some cells it shows M 0 W TH F S 0

if its 0(Zero)....its must show...No Train

Please help me my dear Experts.Trying a lot for this problem.

Thanks

推荐答案

protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{
   DataControlRowType rtype = e.Row.RowType;
   if (rtype == DataControlRowType.DataRow && rtype != DataControlRowType.Footer
       && rtype != DataControlRowType.Separator && rtype != DataControlRowType.Header
       && rtype != DataControlRowType.Pager)
   {
      //ShowToolTip
      e.Row.ToolTip = "Show tool tip here..";
   }
}


这篇关于鼠标上方的Gridview单元中需要工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 04:41