Presenting complex query results through datagrid

B

Bijoy Naick

lets assume that i run a query that returns the following records

countryID,countryName,cityID,cityName
1,USA,1,Chicago
1,USA,2,Los Angeles
1,USA,3,Detriot
2,Canada,7,Toronto
2,Canada,9,Montreal
3,England,15,London

The intended output needs to look like this..

<table>
<tr>
<td>Country</td>
<td>Cities</td>
</tr>
<tr>
<td>USA</td>
<td>Chicago, Los Angeles,Detriot</td>
<tr>
<tr>
<td>Canada</td>
<td>Toronto, Montreal</td>
<tr>
<tr>
<td>England</td>
<td>London</td>
<tr>
</table>

How can I use teh datagrid control to present the information like this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top