wood burning stoves
The moose likes JSF and the fly likes column width in rich:datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "column width in rich:datatable" Watch "column width in rich:datatable" New topic
Author

column width in rich:datatable

Vijay jai Singh
Greenhorn

Joined: Jan 07, 2009
Posts: 26
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

Joined: Jun 25, 2001
Posts: 17035
    
  26

You don't set width in column definitions. Use the dataTable's "columnClasses" attribute.


An IDE is no substitute for an Intelligent Developer.
Vijay jai Singh
Greenhorn

Joined: Jan 07, 2009
Posts: 26
i tried with columnClasses also but it did not work.
V Bhanu
Greenhorn

Joined: Mar 13, 2008
Posts: 2
try style="width:100px;" with semicolon
Sachin Yewale
Greenhorn

Joined: Feb 02, 2012
Posts: 21
use this :

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

its work for me
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17035
    
  26

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.
 
Have you checked out Aspose?
 
subject: column width in rich:datatable
 
It's not a secret anymore!