5
votes

If I set the attribute "scrollable=true" in a PrimeFaces datatable it is scrollable vertically. But is it possible to scroll this table horizontally?

3
The PrimeFaces dataTable component in 2.2 supports only vertical scrolling. But why do you want a horizontal scrolling in the dataTable? Is your dataset not displaying within the contents of the component?Vineet Reynolds
3.0.M3 has horizontal scrolling as well.Cagatay Civici

3 Answers

4
votes

Primefaces supports horizontal scrolling on datatable. Just specify it like that:

<p:dataTable scrollable="true" scrollWidth="700">
1
votes

Try this (XY);
Panel;

<h:panelGroup id="tbl" style="width:100%;overflow:auto;">

data table;

<p:dataTable  paginatorPosition="top" scrollable="true" scrollHeight="300" style="width:100%"   resizableColumns="true"  lazy="true"  >
0
votes

Try this

<p:dataTable resizableColumns="true" tableStyle="width:auto" >

Hope it helps :)