bDeferRender true + bPagination false + local array data source

bDeferRender true + bPagination false + local array data source

terraswatterraswat Posts: 2Questions: 0Answers: 0
edited September 2013 in General
I am using a local array data source with pagination disabled. I would like to only build a few rows of DOM elements at a time to increase the overall client-side performance. Enabling bDeferRender does not seem to do anything for a local array data source unless pagination is enabled. Is there any way to defer rendering of DOM elements with a local data source with pagination disabled?

thank you

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > unless pagination is enabled

    If you disable pagination, then all rows need to be drawn! Hence bDeferRender is pointless in that case.

    If you want you could try using Scroller (i.e. scrolling + pagination disabled): http://datatables.net/extras/scroller/

    Allan
  • terraswatterraswat Posts: 2Questions: 0Answers: 0
    Thanks for the quick reply Allen, and especially thank you for this incredible tool!

    We are using the scroller extra, however that inherits the same issue where a local data source can only be drawn in total. It sounds like the local data must be moved to a server to allow only a portion of the DOM elements to be drawn without pagination. Is this true, or can an sAjaxSource somehow access a local javascript object ?

    The interest in local data with deferred rendering is because the data is already on the client and small enough for manipulation of filtering, sorting and use of the rowGrouping plug-in, but too slow when the DOM is loaded with all the data. I'm not sure if/how rowGrouping would know all the groups on initialization if we were to use sAjaxSource.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    sAjaxSource can't access a local array, but that's what the aaData option is used for - example here: http://datatables.net/release-datatables/examples/data_sources/js_array.html .

    > I'm not sure if/how rowGrouping would know all the groups on initialization if we were to use sAjaxSource.

    I'm not sure either I'm afraid - that's a 3rd party plug-in. I suspect it will be DOM based, so it might not work with deferred rendering enabled...

    Allan
This discussion has been closed.