6 Replies Latest reply on Sep 28, 2009 2:59 PM by scott david

    How to set datatable width?

    scott david Newbie

      Hi,
      I'm trying to set the width of columns in datatable but it is not taking the width. the following is the code.

      <rich:dataTable rows="10" id="devTable"
      value="#{myBean.devList}" var="dev">

      <rich:column width="150" sortBy="#{dev.schoolName}">
      <f:facet name="header">
      <h:outputText value="school Name"/>
      </f:facet>
      <h:outputText value="#{dev.schoolName}" />
      </rich:column>

      <rich:column width="200" sortBy="#{dev.schoolLocation}">
      <f:facet name="header">
      <h:outputText value="school location"/>
      </f:facet>
      <h:outputText value="#{dev.schoolLocation}" />
      </rich:column>
      <rich:column width="50" sortBy="#{dev.schoolDistCode}">
      <f:facet name="header">
      <h:outputText value="school dist code"/>
      </f:facet>
      <h:outputText value="#{dev.schoolDistCode}" />
      </rich:column>
      </rich:datatable>

      if I use column group then the width field is working. but if I use column group, then the sorting feature is not working.

      this seems to be a simple problem but I can't get it to work. Could you help me with a solution for this issue?

      Thanks.