Abusing DataTables (?)

Abusing DataTables (?)

mibaasmibaas Posts: 19Questions: 0Answers: 0
edited April 2014 in General
I hope this spectacular title got your attention! ;-)

I am using DataTables heavily in a current project and when we needed a calendar for a group of ppl, I thought I'll do that with dt as well :-)
The results (anonymized) can be viewed here: http://mbaas.de/dataTables/agenda.htm

Basically it is very nice - the only problem we're having is the scrolling. It would be nice if the headers could be frozen - but when using FixedHeader it nearly kills (or dramatically slows down) IE8/9 (which we unfortunately have to use). So I'm wondering if perhaps there are other ways to achieve this (I still haven't got my head around that ScrollX/ScrollY-stuff, I admit) - or if this is an abuse of dataTables and I should use other controls instead (could anyone recommend appropriate libraries?)....???

Thanks

Michael

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Mega use of DataTables - like it :-). If its tabular data, then DataTables should be able to cope with it.

    FixedHeader will be really slow on that table in old IE due to the number of header elements that need to be cloned and sized. That is a painfully slow operation in old IE. The newer versions are better.

    scrollX and scrollY should work in this situation I think. Can you got an example page that uses them?

    Allan
  • mibaasmibaas Posts: 19Questions: 0Answers: 0
    I did not keep my failed experiments. But I'll give em a try now and will post back...
  • mibaasmibaas Posts: 19Questions: 0Answers: 0
    Allan, sScrollY works fine - but is there a possibility to get a frozen left hand side using sScrollX etc.?
  • mibaasmibaas Posts: 19Questions: 0Answers: 0
    Ah, FixedColumns - will examine :)
  • mibaasmibaas Posts: 19Questions: 0Answers: 0
    Ok, FixedColumns has a display-issue (header and content a few pixels off) - but the performance with IE is unacceptable in that use-case :((
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Yup - cloning nodes and sizing them in old IE is always slow. The biggest speed up your get is using CSS row hight sizing: http://datatables.net/release-datatables/extras/FixedColumns/css_size.html

    Allan
This discussion has been closed.