Hi,
I have this problem in many situations working with a dataList or
another list control. I always populate the headertext for this from
codebehind.
I would realy like to be able to edit some other server controls innside
a Template:
Eksempel:
<asp:dataList id=Mylist runat = server />
<HeaderTemplate>
<TR>
<TD>
ID
</TD>
<td>
Title
</td>
<td>
Username
</td>
</TR>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width= bgcolor=#ffffff>
<%# DataBinder.Eval(Container.DataItem, "DocID")%>
</td>
<td bgcolor=#ffffff>
<%# DataBinder.Eval(Container.DataItem, "Title") %>
</td>
<td bgcolor=#ffffff >
<%# DataBinder.Eval(Container.DataItem, "username") %>
</td>
</tr>
</ItemTemplate>
What I whant is to add the txt fields ID, Title and UserName from
codehind.
How is it possible to add a <HeaderTemplate> dynamicle at runtime with
the preferred nr of columns?
Hope any one have a reference to and article or some ting about working
with template columns from codebehind.
Thanks,
Jan Arve