私はグリッドビューを持っています:
<asp:GridView ID="gvwProd" runat="server" CssClass="gridview" ShowHeaderWhenEmpty="true"
AllowPaging="true" BackColor="ButtonFace" OnRowDataBound="gvwProd_OnRowDataBound"
OnRowCreated="gvwProd_RowCreated" OnSorting="gvw_OnSorting" AllowSorting="true"
AutoGenerateColumns="false" ShowFooter="false">
各行の特定のセルにハンドホバーアイコンを設定しようとしています。
protected void gvwProd_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[2].Attributes.Add("onmouseover", "document.body.style.cursor='hand'");
e.Row.Cells[2].Attributes.Add("onmouseout", "document.body.style.cursor='auto'");
}
}
onmousoverおよびonmouseoutイベントはマークアップに表示されます。
<td onmouseover="document.body.style.cursor='hand'" onmouseout="document.body.style.cursor='auto'" style="white-space:nowrap;">05-07-2012</td>
ただし、手の痕跡はなく、何も起きていないようです。私は何が間違っているのですか?IE8の使用