Click here to Skip to main content
15,851,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all
I need some help here

I have an updatr button it change the count and the total
like that

C#
protected void btnUpdate_Click1(object sender, EventArgs e)
  {

     // try
      //{
          for (int i = 0; i < GridView2.Rows.Count; i++)
          {
              TextBox Tb = (TextBox)GridView2.Rows[i].FindControl("TextBoxCount");
              Basket_DataTable.Rows[i]["count"] = Tb.Text;
              Basket_DataTable.Rows[i]["Total"] = Convert.ToInt32(Tb.Text) * Convert.ToInt32(Basket_DataTable.Rows[i]["SellingPrice"]);
          }



I want also to get the net total when I click into update button too by getting the sum of total How can I do it???
Posted

1 solution

<asp:label id="Label2" runat="server" text="<%# Eval(" sellingprice")&lt;br="" mode="hold" &gt;in="" grid="" view="" you="" need="" to="" get="" value="" like="" this="" .....after="" that="" pass="" in="" update="" button="" event="" and="" calculate&lt;="" xml&gt;"="" xmlns:asp="#unknown">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900