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

rowsPerPageOptions

Expand Messages
  • Alejandro Diaz
    Hello, I have migrated the datatable from 2.5.2 to yui 2.6 and now its working pretty fine, I just have a problem with the rowsPerPageOptions. When I select to
    Message 1 of 1 , Dec 1, 2008
    • 0 Attachment

      Hello,

       

      I have migrated the datatable from 2.5.2 to yui 2.6 and now its working pretty fine, I just have a problem with the rowsPerPageOptions. When I select to show all the records, the paginator updates the values of it, but the datatable is still showing the same quantity of records.

       

      I am trying with this:

       

      var buildQueryString = function (state,dt)

       {

            ActualValueRowsPerPageDropdown = state.pagination.rowsPerPage;

            var url="&start=" + state.pagination.recordOffset;

       

            if(state.pagination.rowsPerPage==values_ds.totalRecords)

            {

                  url=url+"&allrows=1";

            }

            myDataTable.getDataSource().liveData = ds;

            return url;

       }

       

      myPaginator = new YAHOO.widget.Paginator({

                  containers         : ['paging'],

                  totalRecords : mytotalRows,

                  rowsPerPage        : myrowsPerPage,

                  rowsPerPageOptions : [myrowsPerPage,mytotalRows],

                  template          : "{RowsPerPageDropdown}items per Page, {CurrentPageReport}<br>{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}",

                  pageReportTemplate : "Showing items {startIndex} - {endIndex} of {totalRecords}"

                });

       

       

            var myTableConfig = {

            initialRequest         : '',

            generateRequest        : buildQueryString,

            //generateRequest        : '&start=0&allrows=1',

            dynamicData: true,

            sortedBy : {key:'project_id', dir:YAHOO.widget.DataTable.CLASS_DESC},

            paginator              : myPaginator

          };

       

      Any idea about this?

      Best regards,

      Alejandro Diaz
      ccfirst S.A.C.
      ad@...  |  Mobile +51 1 97 67 44 32  |  Office +51 1 421 8337
      website:
      http://www.ccfirst.com/
      ccfirst   |   Convenient Competence®
      The information contained in this email message may be privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this transmission is strictly prohibited. If you have received this communication in error, or if any problems occur with transmission, please notify the sender immediately.

       

    Your message has been successfully submitted and would be delivered to recipients shortly.