我有一個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