+ Start a Discussion
KunlunKunlun 

How to make datatable head fixed and make scroll on table body?

Hi All,

 

I'm trying to create a database with <Apex:datatable/>. There are too many records in this datatable, so scroll is needed. But I need to make the table head fixed, and only can scroll the table body, Is it possible?

 

Thanks

Kunlun

bob_buzzardbob_buzzard
I don't think you'll be able to do this with a datatable, as you don't have enough control over the HTML that is output.

If you use a regular HTML table, you can do this through CSS. Take a look at:

http://stackoverflow.com/questions/8321849/how-to-scroll-tables-tbody-independent-of-thead