jsf - PrimeFaces datatable Scrollbar -
i have form primefaces datatable have set columns width in css :
.idcol{width: 5%} .prioritycol{width: 5%} .titlecol{width: 30%} .descriptioncol{width: 40%} .actionscol{width: 10px}
everything okay when add scrollable="true"
attribute in order have scrollable datatable, result worst :
this declaration of datatable :
<p:datatable id="dtable" var="todos" value="#{todo.todolist}" scrollable="true" resizablecolumns="false" scrollheight="300" lazy="true" styleclass="idcol,prioritycol,titlecol,descriptioncol,actionscol">
what problem? thank you!
you can set column width way
<p:column headertext="type" width="70%">
or can specify style class way
<p:column headertext="type" styleclass="idcol" >
you can add scrollwidth thing this
<p:datatable var="data" rowkey="#{data.key}" style="width:70%" sortorder="ascending" selection="" value="" selectionmode="single" scrollable="true" scrollwidth="71%" scrollheight="3%" > <p:ajax event="rowselect" listener="" update="" /> <p:column headertext="type" styleclass="" sortby="" width="70%"> <h:outputtext id="datatype" value="" /> </p:column> <p:column headertext="category" sortby="" width="30%"> <h:outputtext value="" /> </p:column> </p:datatable>
Comments
Post a Comment