How to decrease Gridview Column value in asp.net C#
Using My code but this code gridview decrease value wrong output pls how to decrease all values in source code.
MY CODE :
int i = 0;
int permissionhrs = 180;
foreach (GridViewRow gvRows in gvLatemints.Rows)
{
total2 = Convert.ToInt32(permissionhrs.ToString()) - Convert.ToInt32(gvRows.Cells[2].Text.Trim());
lblError.Text = "Total Leave :" + total2;
i++;
}
Example gridview column Mints values below
So Permission Hours 180 decrease above gridview column mints column wise
Process Date LateIN Mints
08 Mar 2014 17 15
10 Mar 2014 11 15
13 Mar 2014 17 15
14 Mar 2014 21 30
18 Mar 2014 27 30
22 Mar 2014 19 15
ex:
total=180-15,
answer=165
so this loop wise execute all Mints Values decrease
finally I want Result is:60 mints available in permission hrs
Thanks