您好,我有一个网格视图,它连接到事件 selectedindexchanged 并且位于隐藏面板上,但是当我尝试触发该事件时,什么都不做。这是gridview的代码:
<asp:GridView ID="GridView1" runat="server" CssClass="mGrid"
Width="847px" onselectedindexchanged="GridView1_SelectedIndexChanged2">
<Columns>
<asp:ButtonField Text="Borrar" />
</Columns>
</asp:GridView>
这是事件的代码:
protected void GridView1_SelectedIndexChanged2(object sender, EventArgs e)
{
GridViewRow row = GridView1.SelectedRow;
Response.Write(row.Cells[2].Text);
}