0 Replies Latest reply on Jul 3, 2008 7:48 PM by srinivasan muthu

    Sorting ScrollableDatatable built with Dynamic Columns

    srinivasan muthu Newbie

      I need to sort the columns which are generated dynamically. Without sorting everything works fine, but am not sure how to enable sorting as I use list<String[]> for my data, and there is no property I can specify in sortExpression. I tried with "index" of the array of strings but that doesn't work. Appreciate your help.

      <rich:scrollableDataTable height="370px" rows="25" sortMode="single" var="rowItem" value="#{report.resultList}" width="900px">
       <rich:columns value="#{report.columns}" var="column" index="index" sortable="true" width="#{column.width}px">
       <f:facet name="header">
       <h:outputText title="#{column.title}" class="scrollTableHeader" value="#{column.name}"></h:outputText>
       </f:facet>
       <h:outputText value="#{rowItem[index]}" />
       </rich:columns>
      </rich:scrollableDataTable>