日期:2014-05-18 浏览次数:20503 次
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) e.Row.Attributes["ondblclick"] = "弹出页的js代码"; }
------解决方案--------------------
<asp:GridView ID="GridView3" DataKeyNames="ID" runat="server" AutoGenerateColumns="False" onrowdatabound="GridView3_RowDataBound"> <Columns> <asp:BoundField DataField="ID" HeaderText="ID" /> <asp:BoundField DataField="Name" HeaderText="Name" /> </Columns> </asp:GridView>