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

52348Re: [ydn-javascript] multiple row delete for server side pagination

Expand Messages
  • bahalul kabir
    Jan 12, 2010
    • 0 Attachment
      Hi satyam,
       
      YAHOO.widget.DataTable.prototype.deleteRowsBy = function (condition)
      {
          var start = 0, count = 0, current = 0;                                   
          recs = this.getRecordSet().getRecords();
       
          alert(recs)
          // for 2nd page output for alert(recs)
       ,,,,,,,,,,[object Object],[object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object]    // pagination per page 10
          while (current < recs.length)
           {               
                                                 
              if (condition(recs[current].getData())) { // Error here:  recs[current] is undefined
                          delete here
                }
           }
      How can I omit above undefined(,) value from recs?
      If possible pls help anyone.
       
      Bahalul kabir
       
       

      From: Satyam <satyam@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Thu, January 7, 2010 4:20:22 PM
      Subject: Re: [ydn-javascript] multiple row delete

       

      It should work with client-side pagination, it would not work with server side pagination as it can only delete what it has on the client side, you have to provide the means to delete what is on the server.

      I keep track of the change of state in the checkboxes by updating the RecordSet, thus, even if a record is off page, it will be deleted based on what is on the RecordSet.  Likewise, you would have to notify the server of changes in the checkboxes, if not one by one, which might be too much, any time that you change pages and then, when the deleting is requested you should tell the server to act on its records.  It would probably be a good idea to refresh the whole table as the page borders would change.

      Satyam


      El 07/01/2010 11:28, bahalul kabir escribió:

      Satyam,
      Thanx for your link but  data delete only with first page not deleteing  next page .I mean it does not work with pagination.
      Is there any clue?
       
      Kabir


      From: Satyam <satyam@satyam. com.ar>
      To: ydn-javascript@ yahoogroups. com
      Sent: Wed, January 6, 2010 12:13:27 PM
      Subject: Re: [ydn-javascript] multiple row delete

       

      http://www.satyam. com.ar/yui/ 2.6.0/deleteRows By.html

      El 06/01/2010 10:57, bahalul kabir escribió:

      Hi satyam,
      I am using checkbox in datatable. Is it possible to delete multiple row with single click? Deleting single row with single click is working.
       
      Anyone can help.
       
      Thank you
      Kabir

      No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.126/2602 - Release Date: 01/05/10 20:35:00

      No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.128/2604 - Release Date: 01/06/10 20:35:00

    • Show all 7 messages in this topic