数据库中的retreive记录和工具提示中的显示 [英] retreive record from database and show in tool tip
本文介绍了数据库中的retreive记录和工具提示中的显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
if (e.Row.RowType == DataControlRowType.DataRow)
{
// e.Row.ToolTip = e.Row.FindControl("Country").ToString();
Label lblReview = (Label)e.Row.FindControl("Country");
string tooltip = lblReview.Text;
e.Row.Cells[3].Attributes.Add("title", tooltip);
}
嘿我想要做的每一个我从数据库中检索一些记录并在工具提示中显示。我的gridview有5列一列是Id然后如果我是光标在id cloumn移动所以工具提示显示关于id的记录...
Hey Every one i want to do this i retrieve some record from database and show in tooltip. My gridview have 5 column one Column is Id then if i am cursor move in id cloumn so tooltip show record with respect to id...
推荐答案
试试这个.. 。:)
Try this...:)
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)
{
//Highlight Row
//e.Row.Attributes.Add("onmouseover", "Highlight(this,'#DCEDFF');");
//ShowToolTip
e.Row.ToolTip = "This text needs to shown on mouseover of the row!";
}
}
http://forums.asp.net/t/1808318.aspx/1 [ ^ ]
这篇关于数据库中的retreive记录和工具提示中的显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文