Add multiple footer from code behind

Last Reply 2 days ago By dharmendr

Posted 4 days ago

How to add multiple footer from code behind

                total2 = Convert.ToDecimal(Session["total"].ToString()) + Convert.ToDecimal(total.Text.ToString());
                dt.Rows.Add(product.SelectedItem.ToString(), qty.Text.ToString(), price.Text.ToString(), total.Text.ToString());
                qty.Text = "0";
                price.Text = "0";
                total.Text = "0";
                cgst.Text = "0";
                sgst.Text = "0";
                product.SelectedIndex = product.Items.IndexOf(product.Items.FindByText("select"));
                Session["dtInSession"] = dt;
                GridView1.DataSource = dt;
                GridView1.DataBind();
                GridView1.FooterRow.Cells[2].Text = "Grand Total(Rs.)";                
                GridView1.FooterRow.Cells[3].Text = total2.ToString();
                
                Session["total"] = total2.ToString();
            }
           

        }
        private void gridVIEWData()
        {
            dt.Columns.AddRange(new DataColumn[4] {
                new DataColumn("Product Name"),
                new DataColumn("Quantity"),
                new DataColumn("Price(Rs.)"),
                
                new DataColumn("Total Price(Rs.)"),

              });

            Session["dtInSession"] = dt;
        }
You are viewing reply posted by: Andrea 4 days ago.
Posted 4 days ago
Hi @JanviDarji,
Please try the following

How to add or remove multiple Css Class names from CssClass property from code behind in ASP.Net

It might help you.

Cheers Andrea.