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

Problem joining Server Sorting an Pagination without History

Expand Messages
  • Dunior
    Hello, I m trying to join the server side example and the server side sorting, and everything works find, I just copy the hole code from both examples, but
    Message 1 of 3 , Mar 27, 2008
    • 0 Attachment
      Hello,
      I'm trying to join the server side example and the server side
      sorting, and everything works find, I just copy the hole code from
      both examples, but when the datatable is in a diferent page than the
      first one and I try to sort, the data doesn't display on the
      datatable, shows No records found, here I post some of my
      configurations, if anybody see if I'm forgeting something, or if some
      one has done what I'm trying to do, please share it with me

      Thanks

      this.myDataSource.responseSchema = {
      resultsList : 'Lista',
      fields : this.schemaFields,
      metaFields : {
      totalRecords: 'Total'
      }
      };
      this.myPaginator = new YAHOO.widget.Paginator({
      containers : ['paginado'],
      pageLinks : 5,
      rowsPerPage : 10,
      template : "<strong>{CurrentPageReport}</strong>
      {PreviousPageLink} {PageLinks} {NextPageLink}"
      });
      var myTableConfig = {
      initialRequest : 'startIndex=0&results=25&sort=id&dir=desc',,
      generateRequest : buildQueryString,
      paginationEventHandler :
      YAHOO.widget.DataTable.handleDataSourcePagination,
      paginator : this.myPaginator,
      enderLoopSize: 25,
      sortedBy: {key:'id', dir:''desc},
      };

      var oCallback = {
      success: this.onDataReturnInitializeTable,
      failure: this.onDataReturnInitializeTable,
      scope: this,
      argument: {
      sorting: {
      key: oColumn.key,
      dir: (dir === "asc") ?
      YAHOO.widget.DataTable.CLASS_ASC : YAHOO.widget.DataTable.CLASS_DESC
      }

      }
      }
    • Dunior
      Hello I ve been working on it, trying to fix it, and I found that if the datatable is in a diferent page than the first one and I try to refresh it with the
      Message 2 of 3 , Mar 28, 2008
      • 0 Attachment
        Hello
        I've been working on it, trying to fix it, and I found that if the
        datatable is in a diferent page than the first one and I try to
        refresh it with the code I post below, does the same I said in the
        previous post, the datatable shows No records found, and if I do the
        same but calling onDataReturnSetRows insted, if rows are returned
        everything works fine, but, in the refresh case when no records are
        returned doesn't refresh the datatabloe, and when I sort any column
        calling this event, I have to paginate to see the new order. Please
        any suggestions

        (((this.myDataSource.sendRequest(newRequest,
        {success:this.myDataTable.onDataReturnInitializeTable,scope:this.myDataTable},
        this.myDataTable);)))


        Thanks
      • y_lsmith
        Dunior, Satyam has a server driven example that includes pagination and sorting. Have a look . Hope this helps, Luke ...
        Message 3 of 3 , Apr 1, 2008
        • 0 Attachment
          Dunior,

          Satyam has a server driven example that includes pagination and sorting.  Have a look .

          Hope this helps,
          Luke


          --- In ydn-javascript@yahoogroups.com, "Dunior" <duniorsocarrasb@...> wrote:
          >
          > Hello
          > I've been working on it, trying to fix it, and I found that if the
          > datatable is in a diferent page than the first one and I try to
          > refresh it with the code I post below, does the same I said in the
          > previous post, the datatable shows No records found, and if I do the
          > same but calling onDataReturnSetRows insted, if rows are returned
          > everything works fine, but, in the refresh case when no records are
          > returned doesn't refresh the datatabloe, and when I sort any column
          > calling this event, I have to paginate to see the new order. Please
          > any suggestions
          >
          > (((this.myDataSource.sendRequest(newRequest,
          > {success:this.myDataTable.onDataReturnInitializeTable,scope:this.myDataTable},
          > this.myDataTable);)))
          >
          >
          > Thanks
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.