This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

column width in rich:datatable  RSS feed

 
Vijay jai Singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using JSF 1.2, in one of my web page i am using. I wantwidth of column in rich:datatable to set column's width.



In one of rich:column i need to set width for column, for this i tried like

1) width="100px"
2) headerClass="myWidth" and delared myWidth in css file, .myWidth {width:100px;} but both did not work.

can anyone help me to set column width.
 
Tim Holloway
Saloon Keeper
Posts: 18636
70
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't set width in column definitions. Use the dataTable's "columnClasses" attribute.
 
Vijay jai Singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried with columnClasses also but it did not work.
 
V Bhanu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try style="width:100px;" with semicolon
 
Sachin Yewale
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use this :

<rich:column style="text-align:center;width:10%;">

its work for me
 
Tim Holloway
Saloon Keeper
Posts: 18636
70
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:You don't set width in column definitions. Use the dataTable's "columnClasses" attribute.


Except in richfaces columns. I think I missed noting that this was for RichFaces.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!