For example in my database there are 96 rows and what I want to happen is to group rows by four (the resulting table will have 3 columns with 8 rows). ex
From the looks of it, you would be better off using the datagrid control rather than the datalist. Here is a link to an overview of this control that provides specific examples of implementing it:
http://www.4guysfromrolla.com/articles/040502-1.aspx.
Not sure DataGrid will even do it. If not, consider building the table yourself, using a ListView or Repeater. You can make the cell/row breaks by putting them in Panels, and setting Visible of each Panel according to what is needed.
itemTemplatedatalist
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
Marked as answer by Dino He - MSFT on Jul 06, 2012 05:34 AM
randelramire...
Member
90 Points
81 Posts
How do I group rows in asp.net's datalist control?
Jun 30, 2012 03:17 PM|LINK
For example in my database there are 96 rows and what I want to happen is to group rows by four (the resulting table will have 3 columns with 8 rows). ex
itemTemplate datalist
terridonahue
Member
72 Points
16 Posts
Re: How do I group rows in asp.net's datalist control?
Jun 30, 2012 05:32 PM|LINK
From the looks of it, you would be better off using the datagrid control rather than the datalist. Here is a link to an overview of this control that provides specific examples of implementing it: http://www.4guysfromrolla.com/articles/040502-1.aspx.
itemTemplate datalist
Please 'Mark as Answer' if this post helps you.
OrcsWeb: Managed Windows Hosting Solutions
"Remarkable Service. Remarkable Support."
superguppie
All-Star
48225 Points
8679 Posts
Re: How do I group rows in asp.net's datalist control?
Jul 04, 2012 11:02 AM|LINK
Not sure DataGrid will even do it. If not, consider building the table yourself, using a ListView or Repeater. You can make the cell/row breaks by putting them in Panels, and setting Visible of each Panel according to what is needed.
itemTemplate datalist
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.