True scrolling with Datatables

True scrolling with Datatables

WhatEverWhatEver Posts: 8Questions: 0Answers: 0
edited April 2010 in General
Just wondering, weather it's possible to use Datatable in true scrolling mode (without paging, but with dynamic data load on scrolling event) like it's done in jsGrid (http://trirand.com/blog/jqgrid/jqgrid.html -> "New in version 3.6" -> "True scrolling Rows"). In some case paging is not an appropriate solution and it's needed to have an ability to display all the data set on a single page.
If such mode is not currently achieved with DataTable could we expect it to be added in one of the upcoming release?

With kind regards,

Replies

  • CassiannoCassianno Posts: 19Questions: 0Answers: 0
    jqGrid is free too and, AFAIK, open. Maybe you could check it's source?

    I really don't have any idea by never having checked DT's source :/
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    The way the jqGrid and most other 'grid' libraries do scrolling like that is they split the header and body into different DIV elements (each with it's own table) and then put an overflow: auto onto the body element - nice and easy. I'm very much not a fan of this approach as it breaks the table into two parts semantically - bad for accessibility. Can also lead to a few other complications.

    The approach that would be best is simply to put overflow: scroll on the tbody element, but as you would expect this is not supported in IE. It is something that I plan to look at the for next release, and I've done a little experimentation with infinite loading: http://datatables.net/examples/api/infinite_scroll.html . Can't promise it will be in the next release due to time constrains, but I'll certainly be looking into it at some point.

    Allan
  • themitchythemitchy Posts: 8Questions: 0Answers: 0
    I noticed the header in that example stays on the page after you scroll past the table. I'm struggling hard with the same issue. Any idea how to work around it?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi themitchy,

    I'm currently working on a scrolling mode for DataTables 1.7 - of which I hope to be able to release a beta sometime soon-ish (within a fortnight depending on how much time I can spend on it). It won't to infinite scrolling / loading like above (although no doubt that could be added through API requests) - but that might do the job for you?

    Regards,
    Allan
  • themitchythemitchy Posts: 8Questions: 0Answers: 0
    That would be awesome! Thanks!
This discussion has been closed.