グリッドビューで詳細を編集できません。Edit link(Command Field)をクリックすると、行編集イベントが発生しますが、更新リンクをクリックすると、行編集イベントが再び発生し、更新イベントはまったく発生しません。
助言がありますか ??
グリッドビューで詳細を編集できません。Edit link(Command Field)をクリックすると、行編集イベントが発生しますが、更新リンクをクリックすると、行編集イベントが再び発生し、更新イベントはまったく発生しません。
助言がありますか ??
サンプル コード: デバッガーを使用して確認する必要があるかもしれません。ここで私はあなたのために例を挙げました。
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// Retrieve the row being edited.
int index = GridView1.EditIndex;
GridViewRow row = GridView1.Rows[index];
TextBox t1 = row.FindControl("TextBox1") as TextBox;
TextBox t2 = row.FindControl("TextBox2") as TextBox;
string t3 = GridView1.DataKeys[e.RowIndex].Value.ToString();
lblMsg.Text = "Updated record " + t1.Text + "," + t2.Text + "Value From Bound Field" + t3;
}