Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Datalist or template columns overall


Message #1 by "jan arve dyrnes" <jan.arve@c...> on Tue, 19 Nov 2002 22:49:49 +0100
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



  Return to Index