3 Replies Latest reply on May 21, 2008 1:29 AM by joesepp1974

    Unable to set column Width in datatable

    Frank Newbie

      Dear all,
      anybody managed to set the width of the single columns in a datatable ?
      I have tried most everything "columnsWidth" , styleClass (with row size attribute) but it seems not to work.

      I'm using richfaces-api-3.2.1.CR3

      Thanks a lot
      Francesco

        • 1. Re: Unable to set column Width in datatable
          Marco Bergen Newbie

          via columnClasses...

          so you need a style classe thats contains the size of your column and an other styleclass that contains width:auto

          <style>
          .colwidth100px{ width:100px;}
          .colwidthauto{ width: auto;}
          </style>
          
          ....
          ...
          <h:panelGrid columns="3" columnClasses="colwidthauto, colwidth100px, colwidthauto">
           <h:panelGroup >
           ....
           </h:panelGroup>
           <h:panelGroup >
           ...
           </h:panelGroup>
           <h:panelGroup >
           ...
           </h:panelGroup>
          </h:panelGrid>
          


          so you set the middle column width 100px and the rest ist auto adjusting...


          • 2. Re: Unable to set column Width in datatable
            Frank Newbie

            Hello, thanks for your reply!
            well it still doesn't work but I found what's the problem: the header of the datatable has filter columns. If I remove the filter textfields then the column's width is changed.
            Is it possible to resize the width of the filter fields ?
            Thanks
            Francesco

            • 3. Re: Unable to set column Width in datatable
              joesepp1974 Newbie

               

              "francis1970" wrote:
              Hello, thanks for your reply!
              well it still doesn't work but I found what's the problem: the header of the datatable has filter columns. If I remove the filter textfields then the column's width is changed.
              Is it possible to resize the width of the filter fields ?
              Thanks
              Francesco


              hi francesco,
              have you already found a solution for resizing filter-fields?
              i would need this solution too.
              greetings,
              joe