Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Formatting result from a database query

Reply
Thread Tools

Formatting result from a database query

 
 
Mathias
Guest
Posts: n/a
 
      11-21-2006
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?

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11-22-2006
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]


"Mathias" <> wrote in message
news:...
> 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?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Is the result of valid dynamic cast always equal to the result ofcorrespondent static cast? Pavel C++ 7 09-18-2010 11:35 PM
simulation result is correct but synthesis result is not correct J.Ram VHDL 7 12-03-2008 01:26 PM
1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds Michael Tan Ruby 32 07-21-2005 03:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57