Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using DataList - table and headers

Reply
Thread Tools

Using DataList - table and headers

 
 
Mirek Endys
Guest
Posts: n/a
 
      11-21-2005
Hello,

Im often use DataList for viewing and editing datas. For better layout
controling, I create a table in the template and there I put other controls
or binding data into table cells.

Sometimes, I would use the HeaderTemplate as header of my table (in
ItemTemplate).
How to do it? How to make the table columns in HeaderTemplate linked to
table columns in ItemTemplate?

Thanks.

Mirek.


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11-21-2005
Mirek,

Wrap the table around the datalist like this:
<table>
<aspataList ...>
<HeaderTemplate>
<tr>...</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>...</tr>
</ItemTemplate>
</aspataList>
</table>

Eliyahu

"Mirek Endys" <> wrote in message
news:uy4W$...
> Hello,
>
> Im often use DataList for viewing and editing datas. For better layout
> controling, I create a table in the template and there I put other
> controls or binding data into table cells.
>
> Sometimes, I would use the HeaderTemplate as header of my table (in
> ItemTemplate).
> How to do it? How to make the table columns in HeaderTemplate linked to
> table columns in ItemTemplate?
>
> Thanks.
>
> Mirek.
>
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
Guest
Posts: n/a
 
      11-21-2005
The datalist exposes a property named RepeatLayout which can have a value of
either Table or Flow. To experiment with both outcome try this sample from
the MSDN:
http://msdn.microsoft.com/library/de...ayouttopic.asp

The RepeatLayout=Flow would produce a span for each datalist item being
rendered on the browser. This would prevent you from enclosing the entire
datalist in a <Table> (where the header is only a Tablerow and each item in
the body is another TableRow as the repeater would do).

Therefore you should use CSS to align the columns within different tables by
specifying the TD width values as I did in this sample:
http://www.societopia.net/samples/Da...Hierarchy.aspx

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com


"Mirek Endys" wrote:

> Hello,
>
> Im often use DataList for viewing and editing datas. For better layout
> controling, I create a table in the template and there I put other controls
> or binding data into table cells.
>
> Sometimes, I would use the HeaderTemplate as header of my table (in
> ItemTemplate).
> How to do it? How to make the table columns in HeaderTemplate linked to
> table columns in ItemTemplate?
>
> Thanks.
>
> Mirek.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with wsgiref.headers.Headers Phil Python 4 01-17-2010 04:47 PM
Server cannot clear headers after HTTP headers have been sent Ian ASP .Net Security 2 03-20-2007 09:00 AM
Using DataList - table and headers Mirek Endys ASP .Net Web Controls 2 11-21-2005 05:13 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Reading 'received' headers: Email Headers Parsing dont bother Python 0 03-03-2004 08:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57