1 Reply Latest reply on Jul 20, 2009 5:43 AM by Ilya Shaikovsky

    equal dimensions for cells in a rich:dataGrid

    Kazan Kazan Newbie

      I have the following:

      <rich:dataGrid binding="#{producthandler.productTable}" value="#{producthandler.featuredProducts}" var="product" columns="4" elements="12" width="100%">
      <f:facet name="header">
      <h:outputText value="Featured Products" />
      </f:facet>
      <rich:panel>
      <h:panelGrid width="25%">
      <h:outputText value="#{product.label}" />

      <h:graphicImage value="#{product.image}" />

      <h:commandLink action="#{producthandler.view}"><h:graphicImage value="images/button_view.gif"/></h:commandLink>
      </h:panelGrid>
      </rich:panel>
      <f:facet name="footer">
      <rich:datascroller />
      </f:facet>
      </rich:dataGrid>

      This generates a grid with 4 columns and 3 rows. However, the columns are different widths and rows are different heights.

      Also, the content that fits inside each cell does not always fill the vertical space.

      I need each cell in this table to have equal width and equal height, and the content for each cell needs to stretch to consume all the space for that cell.

      Can anyone help me out?