Hi all,
I am trying to get the % of my totals in a gridview footer .Can anyone help me . Here is my code in vb#
The highlighted in bold line i need to show GPrice/NetPrice * 100
Partial Class Reports_CustomerReport
Inherits System.Web.UI.Page
Private CostPrice As Decimal = 0
Private NetPrice As Decimal = 0
Private GPrice As Decimal = 0
Private GPecent As Decimal = 0
Protected Sub GridView1_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
'check row type
If e.Row.RowType = DataControlRowType.DataRow Then
'If row type is DataRow, add ProductSales Value to TotalSales
CostPrice += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Expr1"))
NetPrice += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Expr3"))
GPrice += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Expr ...
Go to the complete details ...