Click here to Skip to main content
13,504,202 members
Rate this:
Please Sign up or sign in to vote.
See more:
i have table in database in which values are stored a

id cat test val
1. micoexpansion albumin 40
2. microexpanison sugar 20
3. microexpansion jhhj 30
4. macroexpnsion glucose 01
5. macroexpansion hjkh 50

when i am displaying this data in gridview

after formatting i get like this

albumin 40
sugar 20
jhhj 30
glucose 01
hjkh 50

but i want to show like this

albumin 40
sugar 20
jhhj 30

glucose 01
hjkh 50

how can i perform this..

Thanks in Advance.
Posted 26-Feb-13 23:44pm
Tejas Vaishnav 27-Feb-13 5:49am
what was your select query you are firing on database to select data from database?
Jasbeer Singh 27-Feb-13 5:54am
SELECT DISTINCT username, examination, tests,val FROM [report] WHERE ([username] = @username)"
Strange_Pirate 18-Mar-13 8:27am
Which query you are firing to select data from respective TABLE. .

There is correction in your reply


1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Dear Friend,

You can simply print data directly on screen.

For generate displaying format according to your choise.

You can simply use newline syntax, "System.out.println" and "\t" as well.

For this purpose first you have recieved your Result set after manipulation into result set according to your choice Format.

Whenever you complete format simply print data.

Be remember always you done this format on after get data from database, there is not possible for saving data inside database as GRID Format.

Best Regards,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180417.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100