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

Re: [ydn-javascript] YUI DataTable problem refreshing table

Expand Messages
  • mschipperheyn
    Hi, Well, since this is a server side paginated datatable, If I just delete the row in the record set, I will e.g. delete row 15 in range 11-20. So, now I need
    Message 1 of 6 , Jul 31, 2009
    • 0 Attachment
      Hi,

      Well, since this is a server side paginated datatable, If I just delete the
      row in the record set, I will e.g. delete row 15 in range 11-20. So, now I
      need to get row 21. Since this is not on the client yet, I need to refresh
      the DataTable with a round trip to the server. I could refresh the entire
      page, but that is not really elegant. So I just want to re-execute the
      current all to the server.

      When what works, there will also be some remaining issues such as; what if I
      delete row 11 (page 2) and there are only 10 rows left (just one page). But
      that could be calculated. Ideally, of course, DataTable should take care of
      that stuff.

      Any ideas on the first issue?


      Cheers,

      Marc
      --
      View this message in context: http://www.nabble.com/YUI-DataTable-problem-refreshing-table-tp24725677p24753580.html
      Sent from the ydn-javascript mailing list archive at Nabble.com.
    • Ryan V. Bayona
      Hi, I see what you mean. This is what i have in mind : 1 .Assuming total rows is 20. 2. User deletes rows 11-15. 3. Code sends a request to the server, along
      Message 2 of 6 , Jul 31, 2009
      • 0 Attachment
        Hi,
        I see what you mean. This is what i have in mind :

        1 .Assuming total rows is 20.
        2. User deletes rows 11-15.
        3. Code sends a request to the server, along with the 'id' of the rows
        to be deleted.
        4. Server receives the id of the rows to be deleted and removes them
        from the db.
        5. Server should re-execute the query that produced the rows in #1, this
        time the rows 11-15 is not included because they do not exist on the
        database (deleted in #4 ) and returns the result.
        6. Client (Datatable) parses the returned results and replaces all rows
        currently displayed.


        --- In ydn-javascript@yahoogroups.com, mschipperheyn
        <m.schipperheyn@...> wrote:
        >
        >
        > Hi,
        >
        > Well, since this is a server side paginated datatable, If I just
        delete the
        > row in the record set, I will e.g. delete row 15 in range 11-20. So,
        now I
        > need to get row 21. Since this is not on the client yet, I need to
        refresh
        > the DataTable with a round trip to the server. I could refresh the
        entire
        > page, but that is not really elegant. So I just want to re-execute the
        > current all to the server.
        >
        > When what works, there will also be some remaining issues such as;
        what if I
        > delete row 11 (page 2) and there are only 10 rows left (just one
        page). But
        > that could be calculated. Ideally, of course, DataTable should take
        care of
        > that stuff.
        >
        > Any ideas on the first issue?
        >
        >
        > Cheers,
        >
        > Marc
        > --
        > View this message in context:
        http://www.nabble.com/YUI-DataTable-problem-refreshing-table-tp24725677p\
        24753580.html
        > Sent from the ydn-javascript mailing list archive at Nabble.com.
        >
      • mschipperheyn
        Exactly, and *that* is what I can t seem to get working. The idea is just re-executing the current request. Which is what my code is supposed to be doing
        Message 3 of 6 , Jul 31, 2009
        • 0 Attachment
          Exactly, and *that* is what I can't seem to get working.
          The idea is just re-executing the current request. Which is what my code is
          supposed to be doing

          Cheers,

          Marc

          Ryan V. Bayona wrote:
          >
          > Hi,
          > I see what you mean. This is what i have in mind :
          >
          > 1 .Assuming total rows is 20.
          > 2. User deletes rows 11-15.
          > 3. Code sends a request to the server, along with the 'id' of the rows
          > to be deleted.
          > 4. Server receives the id of the rows to be deleted and removes them
          > from the db.
          > 5. Server should re-execute the query that produced the rows in #1, this
          > time the rows 11-15 is not included because they do not exist on the
          > database (deleted in #4 ) and returns the result.
          > 6. Client (Datatable) parses the returned results and replaces all rows
          > currently displayed.
          >
          >
          > --- In ydn-javascript@yahoogroups.com, mschipperheyn
          > <m.schipperheyn@...> wrote:
          >>
          >>
          >> Hi,
          >>
          >> Well, since this is a server side paginated datatable, If I just
          > delete the
          >> row in the record set, I will e.g. delete row 15 in range 11-20. So,
          > now I
          >> need to get row 21. Since this is not on the client yet, I need to
          > refresh
          >> the DataTable with a round trip to the server. I could refresh the
          > entire
          >> page, but that is not really elegant. So I just want to re-execute the
          >> current all to the server.
          >>
          >> When what works, there will also be some remaining issues such as;
          > what if I
          >> delete row 11 (page 2) and there are only 10 rows left (just one
          > page). But
          >> that could be calculated. Ideally, of course, DataTable should take
          > care of
          >> that stuff.
          >>
          >> Any ideas on the first issue?
          >>
          >>
          >> Cheers,
          >>
          >> Marc
          >> --
          >> View this message in context:
          > http://www.nabble.com/YUI-DataTable-problem-refreshing-table-tp24725677p\
          > 24753580.html
          >> Sent from the ydn-javascript mailing list archive at Nabble.com.
          >>
          >
          >
          >
          >

          --
          View this message in context: http://www.nabble.com/YUI-DataTable-problem-refreshing-table-tp24725677p24753807.html
          Sent from the ydn-javascript mailing list archive at Nabble.com.
        • Ryan V. Bayona
          If you re going to do what i suggested, you would need to collect all the records / record ids of the rows to be deleted and then attach them as query
          Message 4 of 6 , Jul 31, 2009
          • 0 Attachment
            If you're going to do what i suggested, you would need to collect all the records / record ids of the rows to be deleted and then attach them as query strings/parameters to Satyam's Datatable requery method..

            Search around here and you can see Satyam's code.


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