Thanks for the tip. I modified your code for the datagrid. This is what worked.
<asp

ataGrid id="DGProducts"
runat="server"
Cellpadding="4" Cellspacing="0" Width="800"
BorderStyle="solid" BorderColor="black" BorderWidth="1"
AlternatingItemStyle-BackColor="palegoldenrod"
ItemStyle BackColor="beige"
HeaderStyle-CssClass="productsHead"
Font-Size="10"
AutoGenerateColumns="false"
OnEditCommand="DGProducts_Edit"
OnCancelCommand="DGProducts_Cancel"
OnUpdateCommand="DGProducts_Update"
OnItemDataBound="Item_Bound">
Public Sub Item_Bound(sender As Object, e As DataGridItemEventArgs)
Dim itemType As ListItemType
Dim intCell As TableCell
itemType = CType(e.Item.ItemType, ListItemType)
If (itemType = ListItemType.Header) Then
intCell = CType(e.Item.Controls(4), TableCell)
intCell.Text = "fy text"
End If
End Sub
thanks,
Dave A.
"Brock Allen" wrote:
> You can do it once the row is created. I do this in a sample here (it's using
> the 2.0 GridView, but the concept is same for v1.1 DataGrid):
>
> http://staff.develop.com/ballen/blog...2-8095a848d821
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
> > I have an editable datagrid with HeaderTemplates that have to be
> > written through code, with data from the database. I can only find
> > code to add new columns and modify text. Is there any way to be able
> > to modify existing HeaderTemplate.Text values?
> >
> > thanks
> > Dave A.
>
>
>
>