2 Replies Latest reply on Jan 29, 2010 1:43 AM by savitachavan

    ExtendedDataTable header issue

    savitachavan

      I'm using rich:extendedDataTable(refer header2.JPG). I tried center aligning the first column i.e the checkbox(both header and data). The checkbox in the header gets center aligned however the height of the header is increased. I tried center aligning the header using the style 'margin-left:auto;margin-right:auto;display:block;' for the h:selectBooleanCheckbox.

      <rich:extendedDataTable>
      <rich:column  style="margin:0px;padding:0px;">
                <f:facet name="header" > 
                <h:selectBooleanCheckbox value="#{Bean.CheckBox}" style="margin-left:auto;margin-right:auto;display:block;">
              <a4j:support event="onclick"  action="#{Bean.CheckBoxChange}"/>
             </h:selectBooleanCheckbox>
                </f:facet>
             <h:selectBooleanCheckbox id="chbx"  >
              <a4j:support event="onclick"  onsubmit="Checked(this);"/>
             </h:selectBooleanCheckbox>
            </rich:column>


      ..... other columns.......


      </rich:extendedDataTable>


      we tried following other ways of center aligning the checkbox in the header
      1. used style= "text-align:center;" for both h:selectBooleanCheckbox, rich:extendedDataTable
      2. we used following in the css to fix the header height
      .extdt-header{
         height: 20px !important;
      }

      Please suggest some solution to center align the checkbox in header without increasing the header height.

        • 1. Re: ExtendedDataTable header issue
          ilya_shaikovsky
          It will be easier to solve on your side locally using for example FireBug to check which styles applied causes such effect.
          • 2. Re: ExtendedDataTable header issue
            savitachavan

            I found the problem which was causing the checkbox to move up (using FireBug). By default, <rich:extendedDataTable> header was putting blank image. I overrode the .extdt-header-sort-img in css.

             

            .extdt-header-sort-img {
               height:0px !important;
               vertical-align:middle !important;
               width:1px;
            }

             

            This fix is working fine with only firefox and not with other browsers(IE and safari).

            Please suggest some solutions to work the same in other browsers also.

             

            Thanks.