Thanks for the reply. Is there no way to iterate thru the collection? This
was available with the datagrid in framework 1.1. There are nearly 50
in logic.
"Manish Bafna" wrote:
> Hi,
> please ignore my previous post.It should be like below:
> you can write a code behind function of the page:
> <Columns>
> <asp:TemplateField>
> <HeaderTemplate>
> <asp:Label ID="Label1" runat="server" Text="<%# GetHeaderText()
> %>"</asp:Label>
> </HeaderTemplate>
> </asp:TemplateField>
> </Columns>
> and in the code behind file of your page define a custom function
> GetHeaderText() where you define the logic for displaying/manipulating the
> header text:
>
> public string GetHeaderText()
> {
> return "Header Text";
> }
> for more details refer
> link:
http://www.eggheadcafe.com/community/aspnet/2/10020486/change-the-header-text-in.aspx > --
> Hope this helps.
> Thanks and Regards.
> Manish Bafna.
> MCP and MCTS.
>
>
>
> "Manish Bafna" wrote:
>
> > Hi,
> > you can write a code behind function of the page:
> > <Columns>
> > <asp:BoundField HeaderText="<%# GetHeaderText() %>"
> > DataField="ProductName" SortExpression="ProductName">
> > </asp:BoundField>
> > </Columns>
> >
> > and in the code behind file of your page define a custom function
> > GetHeaderText() where you define the logic for displaying/manipulating the
> > header text:
> >
> > public string GetHeaderText()
> > {
> > return "Header Text";
> > }
> > --
> > Hope this helps.
> > Thanks and Regards.
> > Manish Bafna.
> > MCP and MCTS.
> >
> >
> >
> > "Richard Roche" wrote:
> >
> > > My business object populates the gridview, but i'm having difficulty
> > > programatically drilling in and changing the headertext at runtime (I need to
> > > change the language of the column heading based on the client). In the
> > > gridview object the column collection is empty, count = 0. Why? Do i need
> > > to drill into the control object? What is the best approach?
> > >
> > > Any help appreciated.
> > > --