Binding a sum grid value to a text box
<p><code>enter code here</code>I have the following funtion that adds up the total for a specific column in a grid. How do I access the highestGB in an independent textbox through asp?
I have tried this, but with no sucess.
<b>Discovery Jobs</b>' >
Can anyone shed a little light, thanks.</p>

<pre><code>double highestGB = 0;

protected void grd_JobTypeJT_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFooterItem)
    {
        footerItem["GB"].Controls.Add(new LiteralControl("Total: &lt;br/&gt;" + highestGB));
    }
    else if (e.Item is GridDataItem)
    {
        GridDataItem dataItem = e.Item as GridDataItem;

    string GB = dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["GB"].ToString();
    double gbValue = Double.Parse(GB);
    totalPrice += gbValue;

    if (highestGB == 0 || highestGB &lt; gbValue)
    {
        highestGB = gbValue;
    }

}
</code></pre>
