0
的點擊整頁刷新,我不希望它是頁面加載發生compleatly */如何停止上點擊網格視圖數據的GridView列
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] = "this.style.cursor='pointer';this.style.textdecoration='underline';this.style.background='#DDDDDD';";
if ((e.Row.RowIndex % 2) == 0) // if even row
e.Row.Attributes["onmouseout"] = "this.style.textdecoration='none';this.style.cursor='pointer';this.style.background='#EFF3FB';";
else
e.Row.Attributes["onmouseout"] = "this.style.textdecoration='none';this.style.cursor='pointer';this.style.background='White';";
e.Row.Attributes.Add("onclick", "Javascript:__doPostBack('myClick','" + e.Row.RowIndex + "');");
}
}
}
我用阿賈克斯,但它不工作.. –
它怎麼不工作?你是否正確地連接了PostBackTrigger? –
但我更新面板的觸發器的屬性 –