Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
SK #1
Add header text dynamically in a datagrid with templatecolumns?
Hello,
I have a dg, which uses templatecolumns. Now I would
like to assing the header text of these columns, with the
names I have in my dataset. But I dont get how to do that.
Here is my dg:
<asp:datagrid id="dg" ... AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<%#container.dataitem("somevalue")%>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
thanks for any suggestion.
SK Guest
-
Wrap Header text in Datagrid (Flex 1.5)
How do I wrap header text in a datagrid in Flex 1.5?? -
Datagrid Header Disappearing Text
When my stand alone flash app is being resized, the two datagrids' header texts disappears and reappears. I've changed fonts, embedded fonts,... -
How to get head text in datagrid header renderer
Hi, I will create a checkbox in one of datagrid's header. And I write a header renderer. Now I want to use the data grid's column header text as... -
Different header and text alignment in winform datagrid ??
How can I have following ? Different header and text alignment in winform datagrid I want to show column center aligned and text right... -
Datagrid not diplaying header text
I am trying have a datgrid which always displays the column header text, even though the datareader to which it is bound is empty. I have a... -
Elton Wang #2
Add header text dynamically in a datagrid with templatecolumns?
Try
dg.Columns[index].HeaderText = HeaderName;
HTH,
Elton Wang
[email]elton_wang@hotmail.com[/email]
that.>-----Original Message-----
>Hello,
>
> I have a dg, which uses templatecolumns. Now I would
>like to assing the header text of these columns, with the
>names I have in my dataset. But I dont get how to do>Here is my dg:
>
><asp:datagrid id="dg" ... AutoGenerateColumns="False">
><Columns>
><asp:TemplateColumn>
> <ItemTemplate>
> <%#container.dataitem("somevalue")%>
> </ItemTemplate>
></asp:TemplateColumn>
></Columns>
></asp:datagrid>
>
>thanks for any suggestion.
>.
>Elton Wang Guest



Reply With Quote

