Save (Store) ASP.Net GridView group sum (total) value in variable using C# and VB.Net

Mehram
 
on Aug 14, 2021 04:54 AM
362 Views

Sir,

how to store .net gridview group sum value in variable.

need to store group value (amount) in variable or in a lnleLastDayBalance.text.

Please help.

private void helper_Bug(string groupName, object[] values, GridViewRow row) 
{ 
    if (groupName == null) return;
    row.BackColor = Color.Bisque;
    row.Cells[0].HorizontalAlign = HorizontalAlign.Center;
    row.Cells[0].Text = "[ Summary for " + groupName + " " + values[0] + " ]";
    if values(0) == "Cash B/F" {
        lblLastDayBalance.Text = "amount of group value"
    }
}

https://stackoverflow.com/questions/13134427/grouping-data-in-asp-net-gridview/68782375#68782375

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Aug 14, 2021 04:56 AM

Refer below article.

Display SubTotal and Grand Total in ASP.Net GridView

Total will be your group sum value.