我有一个GridView。在那里是2列,如图像和状态。在图像列中,一些图像将被禁用。为此,光标手符号不应该来。如何改变这一点。这里是我的代码...光标手符号变化
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="List.ascx.cs"
Inherits="List" %>
<style type="text/css">
.noHand
{
cursor:default
}
</style>
..........
.........
<asp:CommandField ButtonType="Image" ShowEditButton="True" HeaderText="Edit" EditImageUrl="~/IMAGES/Edit.gif">
<ItemStyle HorizontalAlign="Center" />
</asp:CommandField>
代码隐藏
protected void Grid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (Status.Value == "True")
{
//Here Cursor Hand symbol should come
}
else
{
e.Row.Cells[9].CssClass = "nohand";
}
}
在GridView上移动光标时,如果图像被禁用,应该会出现默认光标,或者如果图像被启用,手形符号应该出现。 OnMouseOver,这些应该发生 – RobinHood 2011-02-16 21:47:30
....这是我的CSS。如何在我的RowDataBound中使用这个 – RobinHood 2011-02-16 21:54:32