You can, if you wish, try nested repeaters, but you can easily get away with
just one repeater.
Make an itemtemplate as 2 table rows. Put group id in the top row and record
name and id in the second. Make your data source return records sorted by
group id. Databind the repeater. In the PreRender event loop through the
repeater items and hide all group rows except the first for every group id.
That's it.
A big advantage of this way over nested repeaters is that all record rows
will be aligned nicely since they are all in the same table.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin http://usableasp.net
"Leon Mayne" <le**@rmvme.mvps.orgwrote in message
news:BC**********************************@microsof t.com...
If I have a datatable which looks like this:
Record Id, Group Id, Name
1, 1, Test 1
2, 1, Test 2
3, 2, Test 3
4, 3, Test 4
Is it possible to use nested repeaters to group the information by
GroupId? e.g. displaying something like
Group 1
Test 1
Test 2
Group 2
Test 3
Group 3
Test 4
I normally do this with two datatables inside a dataset and link the group
id column, but in this case I only have a flat datatable like the above.
TIA
--
Leon Mayne
http://leon.mvps.org/