我有gridview
,我在其中更新了一行。直到这个它工作正常,但
当我去编辑第二行时。这里发生的是。早期更新的值消失,第二个值更新。
以下是我的UPDATING代码
protected void GrdCategoryDetails_UpdateCommand(object sender, GridRecordEventArgs e)
{
string Amount = string.Empty;
Amount = e.Record["AMOUNT"].ToString();
Session["V_ID"] = e.Record["VENDOR_ID"];
Session["Amount"] = Amount;
}
public void RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
{
if (e.Row.RowType == GridRowType.DataRow)
{
string Vendor_ID = Convert.ToString(Session["V_ID"]);
if(e.Row.Cells[1].Text == Vendor_ID)
{
string Amount = Convert.ToString(Session["Amount"]);
e.Row.Cells[5].Text = Amount;
}
}
}
知道这里的错误