GridView的SelectedIndexChanged事件不被触发,而是弹出javascript:__doPostBack('gvwList','Selec
这是前台代码<%@ Page Language="C#"........ EnableEventValidation="false"%>
.........
<asp:GridView ID="gvwList" runat="server" SkinID="skigridview1" AutoGenerateColumns="False" DataKeyNames="wftyno"
EnableViewState="False" AutoPostBack="true" EmptyDataText="No data found" Width="100%"
OnSelectedIndexChanged="gvwList_SelectedIndexChanged">
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="wfty" HeaderText="Wafer Type">
<HeaderStyle Wrap="False" Width="100px" HorizontalAlign="Left" />
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="capt" HeaderText="Capacity">
<HeaderStyle Wrap="False" HorizontalAlign="Left" Width="100px" />
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:CommandField ShowSelectButton="True" ShowCancelButton="False">
<HeaderStyle Width="50px" Wrap="False" />
<ItemStyle ForeColor="Blue" />
</asp:CommandField>
</Columns>
<SelectedRowStyle BackColor="DodgerBlue" Font-Bold="True" ForeColor="White" />
</asp:GridView>
后台就是
protected void gvwList_SelectedIndexChanged(object sender, EventArgs e)
{
txtwfty.Text = gvwList.Rows[gvwList.SelectedIndex].Cells[0].Text;
}
这个网页是经showModalDialog打开的
补充:.NET技术 , ASP.NET