• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to set the number of values per column

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you forget to post your code?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mahi Lohi wrote:

Thank you for your post



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