Hello.
I need help with the following problem.
I have a gridview with two bound fields, numItems and itemPrice. I have an empty templatefield that has a label control. I need to display the result of numItems * itemPrice as Total using the label control. I have tried to do it in the RowDataBound event, but the FindControl method fails to find the control.
protected void gvItems_RowDataBound(object sender, GridViewRowEventArgs e)
{
Label itemTotal = (Label)e.Row.FindControl("lblItemTotal");
}
What am I doing wrong here. I am using a SQLDataSource for the GridView and am open to returning the itemTotal in the SQL query if that's easier. numItems in an integer and itemPrice is smallmoney.
THanks.
ASKER
Thank you.