我想選擇databound字段值。即時得到編譯錯誤說多年平均值包含definatin的細胞如何在rowupdating事件中獲取gridview的boundfield值
<asp:GridView ID="gvBankDetails" runat="server" AutoGenerateColumns="false" AutoGenerateEditButton="true" OnRowEditing="gvBankDetails_RowEditing" OnRowCancelingEdit="gvBankDetails_RowCancelingEdit" OnRowUpdating="gvBankDetails_RowUpdating">
<Columns>
<asp:BoundField HeaderText="sl no" DataField="id" />
</Columns>
</Gridview>
protected void gvBankDetails_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string dtr = ((TextBox)gvBankDetails.Cells[0].Controls[0]).Text;
}
HTTP是不同的://www.codeproject.com/Articles/792388/Why-GridView-RowUpdating-Event-is-not-giving-the-u可能這個鏈接會幫助你。 –