• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set the number of values per column

 
Mahesh Lohi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I wish to display 5 records per row. the 6th record must start from the 2nd row. Please help.
ex:
3 4 5 6 7
3 4 2 3 5
.
.
so on

Each record is retrived from DB.

Thank you in advance


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you forget to post your code?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Did you forget to post your code?


Is that a serious question or are you nicely asking to come up with an approach first? ;)
 
Mahesh Lohi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sebastian Janisch wrote:
Bear Bibeault wrote:Did you forget to post your code?


Is that a serious question or are you nicely asking to come up with an approach first? ;)


Thank you for the quick reply

I have few records int the DB I would like only 5 reconds in each row. Onces executeQuery statement is executed the result will be in rs. Now the problem is how can I limit the recordes in each row to 5 in jsps

Thank you in advance
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think about it. What you need is a loop. Starting a new line means that whenever the run variable divided by 5 has no rest, there needs to be a new row.

Try yo come up with some code of your own. The hint above should help you...
 
Mahesh Lohi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sebastian Janisch wrote:Think about it. What you need is a loop. Starting a new line means that whenever the run variable divided by 5 has no rest, there needs to be a new row.

Try yo come up with some code of your own. The hint above should help you...


Thank you for your post

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mahi Lohi wrote:

Thank you for your post



Could you post your code so others can profit from it ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic