ListView: Display data divided into groups?
Posted
by jawonlee
on Stack Overflow
See other posts from Stack Overflow
or by jawonlee
Published on 2010-05-03T19:55:21Z
Indexed on
2010/05/03
19:58 UTC
Read the original article
Hit count: 169
I would like to display the contents of a DataTable, divided into several groups depending on the value of one of the columns. So, if I have a DataTable (from SQL query) with:
GroupID Name Description
1 foo bar
1 one two
2 some thing
I would like to place all records containing GroupID 1 in one div, all records with GroupID 2 in another div, and so on. How can I do this?
I'm writing in ASP.NET 4.0, with C# codebehind.
© Stack Overflow or respective owner