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

Re: [ydn-javascript] multiple row delete

Expand Messages
  • Satyam
    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
    Message 1 of 7 , Jan 7, 2010
    • 0 Attachment
      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@...>
      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
    • bahalul kabir
      Hi satyam, YAHOO.widget.DataTable.prototype.deleteRowsBy = function (condition) {     var start = 0, count = 0, current =
      Message 2 of 7 , 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

      • Satyam
        As I ve said, it will not work with server side pagination, it only works with client side or no pagination. I don t mean to make it work with server-side
        Message 3 of 7 , Jan 12, 2010
        • 0 Attachment
          As I've said, it will not work with server side pagination, it only works with client side or no pagination. I don't mean to make it work with server-side pagination because it is too dependent on the client-server communication.  With server-side pagination, not all items in the RecordSet are filled in with actual records, they are placeholders for records that might eventually come. Since those are not available at the client side, I cannot test the condition on them.  If the condition purely depended on the action of the visitor, they would have been in memory, but if the condition is some sort of generic filter that might apply to records not loaded, then, it would render inconsistent results, which is one more reason this method cannot be incorporated into the library, there are too many situations that are dependent on the application.

          To skip over empty records, those that are not loaded client-side, simply change:

            if (recs[current] && condition(recs[current].getData())) {

          That will not produce this error, but I cannot guarantee it will produce the desired result on your application.

          Satyam

          El 12/01/2010 12:09, bahalul kabir escribió:
          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

          No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.135/2615 - Release Date: 01/11/10 20:35:00
        • bahalul kabir
          Thanx satyam, For client side its working .And to delete from database I just sent async request inside the loop and thats working too. Thanx once again.
          Message 4 of 7 , Jan 12, 2010
          • 0 Attachment
            Thanx satyam, For client side its working .And to delete from database I just sent async request inside the loop and thats working too.
            Thanx once again.
            Kabir
             

             


            From: Satyam <satyam@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Tue, January 12, 2010 12:38:53 PM
            Subject: Re: [ydn-javascript] multiple row delete for server side pagination

             

            As I've said, it will not work with server side pagination, it only works with client side or no pagination. I don't mean to make it work with server-side pagination because it is too dependent on the client-server communication.  With server-side pagination, not all items in the RecordSet are filled in with actual records, they are placeholders for records that might eventually come. Since those are not available at the client side, I cannot test the condition on them.  If the condition purely depended on the action of the visitor, they would have been in memory, but if the condition is some sort of generic filter that might apply to records not loaded, then, it would render inconsistent results, which is one more reason this method cannot be incorporated into the library, there are too many situations that are dependent on the application.

            To skip over empty records, those that are not loaded client-side, simply change:

              if (recs[current] && condition(recs[ current]. getData() )) {

            That will not produce this error, but I cannot guarantee it will produce the desired result on your application.

            Satyam

            El 12/01/2010 12:09, bahalul kabir escribió:

            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@satyam. com.ar>
            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

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

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