哭求高手指点---gridview控件的显示问题
web窗体中有一个gridview控件,代码如下:
<asp:GridView ID="OtherWorkView" DataSourceID="myOtherWorkView" runat="server" onRowDataBound="OtherWorkView_RowDataBound" >
<Columns>
<asp:BoundField HeaderText="工作类型" DataField="WorkType" ItemStyle-Font-Size="Medium" />
<asp:BoundField HeaderText="工作人员" DataField="Worker" ItemStyle-Font-Size="Medium" ItemStyle-Width="50px" />
<asp:TemplateField HeaderText="工作内容" >
<ItemTemplate >
<asp:Label ID="lblWorkContent" runat="server" Font-Size="Medium" ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="myOtherWorkView" runat="server" ConnectionString="<%$ ConnectionStrings:myConnection %>" SelectCommand="select * from tab_OtherWork_WorkType ORDER BY ID" />
该控件的第三列“工作内容”,在onRowDataBound事件中做了处理,因为内容很多,用前十个字符加。。。 来代替,代码如下:
protected void OtherWorkView_RowDataBound(object sender, GridViewRowEventArgs e) //动态显示OtherWorkView控件中的内容
{
e.Row.Attributes["onmouseover"] = "c=this.style.backgroundColor;this.style.backgroundColor='AliceBlue'";
e.Row.Attributes["onmouseout"] = "this.style.backgroundColor=c";
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drv = (DataRowView)(e.Row.DataItem);
Label lblWorkContent = (Label)e.Row.FindControl("lblWorkContent");
string strContent = drv["WorkContent"].ToString();
if (strContent.Length > 10)
{
strContent = strContent.Substring(0, 10);
strContent = strContent + "...";
}
lblWorkContent.Text = strContent;
}
}
我现在想实现的功能是:在鼠标挪到该控件的第三列“工作内容”时,能在鼠标右下方弹出一个小窗口,显示对应这一列全部的详细内容,哭求高手指点。。。。。。