Click here to Skip to main content
11,790,946 members (54,379 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET VB.NET
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 at 27-Feb-13 5:49am
what was your select query you are firing on database to select data from database?
Jasbeer Singh at 27-Feb-13 5:54am
SELECT DISTINCT username, examination, tests,val FROM [report] WHERE ([username] = @username)"
Strange_Pirate at 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
0 ppolymorphe 385
1 OriginalGriff 385
2 Richard MacCutchan 118
3 Jochen Arndt 85
4 Maciej Los 70
0 OriginalGriff 1,329
1 Maciej Los 835
2 ppolymorphe 780
3 KrunalRohit 686
4 CPallini 661

Advertise | Privacy | Mobile
Web02 | 2.8.1509028.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2015
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