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

server side pagination and sorting with dynamic data

Expand Messages
  • bahalul kabir
    Hi, Pagination is working but How can I delete a row and dynamicaly update the data var myColumnDefs = [ // sortable:true enables sorting
    Message 1 of 3 , Oct 23, 2009
    • 0 Attachment
      Hi,
      Pagination is working but
      How can I delete a row and dynamicaly update the data
       
      var myColumnDefs = [ // sortable:true enables sorting
              {key:"date", label:"Date", sortable:true},
              {key:"id", label:"Delete", formatter:YAHOO.widget.DataTable.formatDelete}
          ];
       
       YAHOO.widget.DataTable.formatDelete = function(elLiner, oRecord, oColumn, oData) {
          var ID = oData;
           elLiner.innerHTML = "<a href=\"#\" onclick=\"moavaRequest(\'index.php?show=ajax&module=support&action=delete&category='.$category.'&status='.$status.'&results='.$numResults.'\', \'deletediv\', \'ID=" + ID + "\'); return false;\">Delete</a>";
                     
           };
       
      But  data is not updated dynamically.
       
       
      Thank you
      kabir

    • Satyam
      The first few paragraphs in this article: http://yuiblog.com/blog/2008/10/27/datatable-260-part-two/ deal with your question. I would like to add that putting
      Message 2 of 3 , Oct 23, 2009
      • 0 Attachment
        The first few paragraphs in this article:

        http://yuiblog.com/blog/2008/10/27/datatable-260-part-two/

        deal with your question.

        I would like to add that putting onEvent attributes in links is not a
        recomended practice. It is best to listen to cellClickEvent,
        linkClickEvent or any of the several clickEvents available, as the
        example in the article shows. It is easy to retrieve all sorts of
        information from the record associated to the cell clicked when and if
        it is needed without having to clutter the HTML.

        Satyam

        bahalul kabir escribió:
        >
        >
        > Hi,
        > Pagination is working but
        > How can I delete a row and dynamicaly update the data
        >
        > var myColumnDefs = [ // sortable:true enables sorting
        > {key:"date", label:"Date", sortable:true},
        > {key:"id", label:"Delete",
        > formatter:YAHOO.widget.DataTable.formatDelete}
        > ];
        >
        > YAHOO.widget.DataTable.formatDelete = function(elLiner, oRecord,
        > oColumn, oData) {
        > var ID = oData;
        > elLiner.innerHTML = "<a href=\"#\"
        > onclick=\"moavaRequest(\'index.php?show=ajax&module=support&action=delete&category='.$category.'&status='.$status.'&results='.$numResults.'\',
        > \'deletediv\', \'ID=" + ID + "\'); return false;\">Delete</a>";
        >
        > };
        >
        > But data is not updated dynamically.
        >
        >
        > Thank you
        > kabir
        >
        >
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.5.423 / Virus Database: 270.14.27/2452 - Release Date: 10/22/09 18:44:00
        >
        >
      • bahalul kabir
        Thanx satyam.Its working ________________________________ From: Satyam To: ydn-javascript@yahoogroups.com Sent: Fri, October 23, 2009
        Message 3 of 3 , Oct 26, 2009
        • 0 Attachment

          Thanx satyam.Its working

          From: Satyam <satyam@...>
          To: ydn-javascript@yahoogroups.com
          Sent: Fri, October 23, 2009 7:50:17 PM
          Subject: Re: [ydn-javascript] server side pagination and sorting with dynamic data

           

          The first few paragraphs in this article:

          http://yuiblog. com/blog/ 2008/10/27/ datatable- 260-part- two/

          deal with your question.

          I would like to add that putting onEvent attributes in links is not a
          recomended practice. It is best to listen to cellClickEvent,
          linkClickEvent or any of the several clickEvents available, as the
          example in the article shows. It is easy to retrieve all sorts of
          information from the record associated to the cell clicked when and if
          it is needed without having to clutter the HTML.

          Satyam

          bahalul kabir escribió:

          >
          >
          > Hi,
          > Pagination is working but
          > How can I delete a row and dynamicaly update the data
          >
          > var myColumnDefs = [ // sortable:true enables sorting
          > {key:"date", label:"Date" , sortable:true} ,
          >
          {key:"id", label:"Delete" ,
          > formatter:YAHOO. widget.DataTable .formatDelete}
          > ];
          >
          > YAHOO.widget. DataTable. formatDelete = function(elLiner, oRecord,
          > oColumn, oData) {
          > var ID = oData;
          > elLiner.innerHTML = "<a href=\"#\"
          > onclick=\"moavaRequ est(\'index. php?show= ajax&module= support&action= delete&category= '.$category. '&status= '.$status. '&results= '.$numResults. '\',
          > \'deletediv\ ', \'ID=" + ID + "\'); return false;\">Delete< /a>";
          >
          > };
          >
          > But data is not updated dynamically.
          >
          >
          > Thank you
          > kabir
          >
          >
          >
          >
          > ------------ --------- --------- --------- --------- --------- -
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - www.avg.com
          > Version: 8.5.423 / Virus
          Database: 270.14.27/2452 - Release Date: 10/22/09 18:44:00
          >
          >


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