在gridview单元格鼠标上工具提示显示 [英] on gridview cell mouse over tooltip show

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

问题描述

我有



EmployeeDetail表包含五个字段

empno,

empname,

city,

地区,

区域



使用这些列绑定gridview

empno,

empname,

city



当鼠标悬停在城市范围内时工具提示上的区域显示



请一步一步给我一个complate解决方案



提前感谢。

I have

EmployeeDetail Table contais five field
empno,
empname,
city,
region,
zone

bind gridview with these columns
empno,
empname,
city

and when mouse over the city field its region and zone display on tooltip

please give me a complate solution step by step

thanks in advance.

推荐答案

protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
    e.Row.Cells[5].Attributes.add("Title",e.Row.Cells[5].Text);
//where cell 5 has the city
}


// Server Side Code
        protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            e.Row.Cells[5].Attributes.add("onmouseover", "ShowTip(this);");
        }



        // JavaScript Function
        function ShowTip(td)
        {
            td.title = td.innerText;
        }


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

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