Win a copy of Learning Java by Building Android Games this week in the Android forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Can the number of columns in a html table can be restricted  RSS feed

 
Greenhorn
Posts: 10
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,

I want to know wheather the number of columns in a html table can be restricted. as with panelGrid , v have an option to specify the number of columns , can the same be done with noraml html table?
Can any please suggest any way to accomplish this task.

Thanks in advance
Supriya
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think I understand the question. If you want only a certain number of columns, then just create that many. HTML is static text - if a table has N columns, then it'll keep having N columns. (That's assuming that you're not using some client-side JavaScript/DOM manipulation that might change it; in that case the maximum number of columns would need to be built into it the code.)
 
Supriya Pramod
Greenhorn
Posts: 10
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually my issue is ,

I have some 8 sets of values which needs to be dispalyed as 8 columns(without any headers). Later when i add a new value , i want it to be continued in the next row as the first column , and then it should go on til 8. Likewise , every new set of 8 values should be a different row.
Can this be accomplished?

Thanks,
Supriya
 
Ulf Dittmer
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When is "later" - after a page reload, or still on the same page? if the former, you can just create the page any you want on the server - no problem. If the latter, then you need to use JavaScript/DOM manipulation, and keep track of how many values are in the current row, so that you can start a new one after the eighth value in a row.
 
Supriya Pramod
Greenhorn
Posts: 10
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initially the page will have 6 or 8 values in a row.
the page also contains a add button. when i click on add , a textbox comes on the next column(i.e., after the last column). on save , it gets added as another column.Likewise , after evry 8 , a next row must come.

Thanks,
Supriya
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you having a problem with exactly? How are you adding the row to the end?

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!