1
Answer

a gridview row databound value change

Deepak jena

Deepak jena

7y
202
1
in agridview row databound if aquantity value 2.when we add a new row the previous quantity  valuealso return 1 .but i want this textbox value assign with previous value 2.plz give the solution.here i  have written  code.
 
if (e.Row.RowType == DataControlRowType.DataRow)
{
int i = 1;
TextBox t = (TextBox)e.Row.FindControl("txtquantity");
t.Text = Convert.ToString(i);
Session["quantity"] = t.Text;
txttotalitem.Text = t.Text;
Session["quantity"] = GridView1.Rows.Count;
 i want only row  which added newly his value will 1 but previous row value means old row value remain unchanged.

Attachment: Capture12.rar

Answers (1)