Loading ...
Sorry, an error occurred while loading the content.

Initial dataload datatable

Expand Messages
  • jvdongen
    Hi, I m working on an application which uses the datatable component with a XHR datasource. I m trying to achieve the same goals as Don (see
    Message 1 of 1 , Aug 25 12:35 PM
    • 0 Attachment
      Hi,

      I'm working on an application which uses the datatable component with a XHR datasource.

      I'm trying to achieve the same goals as Don (see http://tech.groups.yahoo.com/group/ydn-javascript/message/51001) - basically surpress the second http request for the initial load. When generating the page with the datatable on it, I already have the initial batch of data so I can stick it right into the table.

      The approach outlined by Don generally works, but breaks pagination. handleDataReturnPayload and doBeforeLoadData are not called for some reason, hence I cannot set payLoad.totalRecords.

      If I tweak datatable.js to set payLoad.totalRecords in onDataReturnSetRows everything works as expected - but that is of course not the way to go.

      I also tried to achieve the same goal by feeding the initial batch of data using the initialLoad parameter as outlined in the datatable documentation under 'loading initial data', however that still results in getting an extra http request right after loading the datatable.

      Could someone more knowledgeable about datatable please shine some light on this issue?

      Kind regards,
      Jeroen van Dongen
    Your message has been successfully submitted and would be delivered to recipients shortly.