Hello Mark,
We can call FindControl method on the template cell to get the control with
the value in need. Suppose there's a Label control whose id is lblText in
the template, the ReturnCalculateValue function can be writtern in this way:
public string ReturnCalculateValue()
{
Label lbl =
(Label)GridView1.Rows[0].Cells[0].FindControl("lblText");
return lbl.Text;
}
Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================