all groups > asp.net datagrid control > november 2006 >
You're in the

asp.net datagrid control

group:

Formatting result from a database query



Formatting result from a database query Mathias
11/21/2006 7:40:42 PM
asp.net datagrid control: From my database query I get the following:

Text Number
Albert 12
Albert 14
Albert 16
Brian 20
Brian 21
Brian 22

Now I'd like to represent the data as:

Albert 12 14 16
Brian 20 21 22

I've looked at repeaters, data sets, data readers but I can't figure
out how to go about it. Preferably I'd like to represent the data in a
GridView. Can anyone please guide me in the right direction? :)
Re: Formatting result from a database query Eliyahu Goldin
11/22/2006 4:44:22 PM
The easiest solution is to build programmatically a new datatable containing
one row per name out of the original result set and databind the gridview to
the new table.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


[quoted text, click to view]

AddThis Social Bookmark Button