Deepak jena

Deepak jena

  • NA
  • 45
  • 1.7k

increment of row data bound field

Apr 7 2017 1:13 AM
Hello Sir,
In my project inside a grid view one textbox value i want to increse its value when rowcommand button add(+) click ed,Sir Please give me the solution urgent sir.
i am using this code 
 
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{

DataTable dt = (DataTable)Session["trndata"];
int i = 1;
int rowindex = int.Parse(e.CommandArgument.ToString());
((TextBox)(GridView1.Rows[rowindex].FindControl("txtquantity"))).Text = i.ToString();

if (e.CommandName == "Add")
{
i++;
((TextBox)(GridView1.Rows[rowindex].FindControl("txtquantity"))).Text = i.ToString();
CountTotal();

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Attachment: Capture4.rar

Answers (1)