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

31758Issue with addRow() and pagination

Expand Messages
  • rashmeep2000
    May 29 1:58 AM
    • 0 Attachment
      hi all,
      my addRow method looks like this...
      YAHOO.util.Event.addListener("addrow","click",function() {
      //var data=.....
      totalRecordsMy = myPaginator.getTotalRecords()

      var toAdd = myPaginator.getTotalRecords()+1;

      totalRecordsMy = totalRecordsMy+1;//alert(totalRecordsMy);
      myPaginator.setTotalRecords(totalRecordsMy, false);

      var toPage = totalRecordsMy/rowsPerPageMy;alert("toPage--"+toPage);

      myDataTable.addRow(recoor);
      if(toPage > myPaginator.getTotalPages()){
      myPaginator.setPage(myPaginator.getTotalPages()+1, false);
      }else { myPaginator.setPage(myPaginator.getTotalPages(), false);
      }

      },this,true);

      When i cleick on addor for first time, it doesnot add row, but goes
      to next page, on second click it adds row, also i ahve 5 rowsperpage,
      after adding 5 rows, i keep clicking on addrow, it adds rows, but
      doesnot paginate to the page in which it has added new row, i forced
      my setting page, that is also not working.please help..thanks.
    • Show all 13 messages in this topic