1
votes

Stickyheader works in pages, I have a datatable inside a dialog which has more than 100 rows, user has to scroll down

<p:dialog>

    <p:datatable stickyHeader="true" >
     ..
     ..
     ..
    </p:datatable>

</p:dialog>

I need to enable fixed columnheaders for the datatable.

2

2 Answers

4
votes

stickyHeader="true" won't work inside a dialog, finally i found an alternative solution to this

<p:dialog>

    <p:datatable scrollable="true" scrollHeight="150" >
     ..
     ..
     ..
    </p:datatable>

</p:dialog>

This worked well for me

0
votes

Scrollable is something different than Sticky Header, but if you need your dataTable to behave exactly like primeface's Sticky Header, you can use this feature. Here jsfiddle.net/DTcHh/1360/ is an easy example how to use it.