I am using column level filters and pagination(inbuilt) in my data table. I wanted to use columntoggler behaviour also. But when use columntoggler specific code inside datatable its not working. If I remove scrollable="true"
column toggler will work, but pagination and filter will not work.
I have followed this post
Below is my code. Any inputs on this.
<p:dataTable id="orderslist" var="order"
value="#{orderdetails.orderDetailsList}" scrollable="true"
styleClass="ui-dynamic-height" sortMode="multiple" emptyMessage=""
resizableColumns="true" frozenColumns="1"
widgetVar="orderstatustable" paginator="true"
rows="15" paginatorPosition="top"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="15,20,25">
<f:facet name="header">
<p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
<p:columnToggler datasource="orderslist" trigger="toggler">
<p:ajax event="toggle" listener="#{orderdetails.onToggle}" />
</p:columnToggler>
</f:facet>