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

Re: pagination breaks when using sendRequest with onDataReturnInitializeTable

Expand Messages
  • y_lsmith
    ... still needs to be ... the browser, no server ... has been loaded into ... Aha. It sounds like you want to use Connection Manager to grab the full data
    Message 1 of 4 , Apr 30, 2008
      --- In ydn-javascript@yahoogroups.com, "peterbrown2" <peter@...> wrote:
      >
      > Actually, what I'm trying to do is a little different.
      >
      > When I first load the DataTable I load all data.
      >
      > Then, the user does a search and receives a subset, but that subset still needs to be
      > paginated. However, in both cases the pagination is done totally in the browser, no server
      > data is needed to paginate since all the data necessary in both cases has been loaded into
      > the DataTable.

      Aha.  It sounds like you want to use Connection Manager to grab the full data set, then use a function type DataSource to display a filtered set of records.  The linked example isn't paginated, but all you'd need to do is add

      Ex.dataSource.doBeforeCallback = function (req, full, response) {
          response.meta = { totalRecords : response.results.length };
      };


      And you should be in business.

      Hope this helps,
      Luke
    Your message has been successfully submitted and would be delivered to recipients shortly.