Hi I started a project for a class, where I have to create a SQL data base and using stored procedure extract the values according to 3 drop down lists and bind it to a Gridview. Up to here I am ok where I am stuck is that once the data has been bind I have to calculate the totals of certain cells within the grid view. So my teacher told me I would have to create some variables and have it in the RowDataBind event and here is where I run into problems. here is the code I have so far:
budgetedTotal = ((Label)e.Row.FindControl("Budgeted_TCV")).Text;
if (budgetedTotal != null && budgetedTotal != "")
{
budgetedTotal = budgetedTotal +Convert ToUInt32(budgetedTotal);
}
else
{
budgetedTotal = budgetedTotal + 0;
}
Label lblProjectType = (Label)e.Row.FindControl("lblProjectType");
lblProjectType.Text = budgetedTotal;
}
Thanks any help is super welcomed or any other ideas at this point I am open to anything.