"Mark Rae" <ma**@markNOSPA Mrae.comwrote in message
news:OE******** ******@TK2MSFTN GP03.phx.gbl...
"Jeff" <it************ @hotmail.com.NO SPAMwrote in message
news:ev******** ******@TK2MSFTN GP05.phx.gbl...
>>When you say HeaderTemplate, do you mean you want to overwrite the text
in the first column's header...?
Or are you actually thinking of the GridView's Caption property...?
Yes, I want to overwrite the text in the HeaderTemplate
<MyGridView>.Co lumns[0].HeaderText = "Inbox";
thanks, but somehow the text isn't displayed. I here post the markup of my
gridview so you can see if there are something wrong with the markup:
<asp:GridView ID="gridMessage "
Width="100%"
AutoGenerateCol umns="false"
OnRowDataBound= "gridMessage_Ro wDataBound"
runat="server"
BorderWidth="0"
BorderStyle="No ne"
RowStyle-BackColor="#EBE BEB"
AlternatingRowS tyle-BackColor="#D9D 9D9"
DataSourceID="o dsMessage">
<Columns>
<asp:TemplateFi eld ControlStyle-Width="100%"
HeaderStyle-Width="100%">
<HeaderTemplate >
</HeaderTemplate>
<ItemTemplate >
<some text here>
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
</asp:GridView>
In the open event I set the text:
gridMessage.Col umns[0].HeaderText = "Inbox";
In order to keep the markup I posted here tidy I removed the contents inside
the column and replaced it with this text <some text here>....
Any suggestions?