Ajax & serverprocessing and multi-selection across redraws (Feature request?)

Ajax & serverprocessing and multi-selection across redraws (Feature request?)

WEHAWEHA Posts: 26Questions: 3Answers: 0

I'm trying to make a selection possible over one or more buffer draws.
I've seen this code but this solution is not so elegant: https://datatables.net/forums/discussion/582/user-selectable-rows-multiple-rows-with-server-side-processing

What I would want is to have the scroller only add rows and not remove them from the buffer.
This way selection could work properly and not so fidgety as it is now when draws happen and you try to shift select some rows.
Is this possible? I have not found any parameter that would do this so far.

Thanks!

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    No, you're right, Scroller has a sliding window and if rows fall out of that window, they're erased. This allows for Scroller to display tables with millions of rows which would otherwise kill the browser.

    The only configuration option you have is to modfify the size of that window with scroller.displayBuffer,

    Colin

  • WEHAWEHA Posts: 26Questions: 3Answers: 0

    I understand that this could be required for millions of rows but I don't need millions.
    I only use it to save processing time on queries.
    Displaybuffer also has a limit so when the user is just at the boundry of that it would result in the same issue.
    Would it be possible to add a feature that disables the erasing of these rows when scrolling?

  • ComGreedComGreed Posts: 15Questions: 3Answers: 1
    edited April 2020

    I used checkboxes instead of select and when the checkbox is clicked it saves the data of the row into an array (and removes it when I deselect). When I use the editor to edit or delete rows I add those that are not in the buffer back to the table without drawing. Unfortunatly I still did not figure it out how to pass the array of row data directly into the editor.

    My solution is very similar to the one you linked to from 2009.

  • WEHAWEHA Posts: 26Questions: 3Answers: 0

    Checkboxes is an idea yes, but I don't really want to add form elements to my table.
    There is a secondary problem that still exists and that's datatables being fidgety about shift selecting -> scroll with redraw -> and shift selecting again.
    Checkboxes unfortunately don't solve this but thank you for your idea.

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770

    I wonder if the Pipelining example might be useful for you. Maybe you can customize it to fit your needs. Not sure if it plays well with scroller though.

    Kevin

  • WEHAWEHA Posts: 26Questions: 3Answers: 0

    If I understand it correctly, this would still erase the lines from dom and in turn removing the selection. :(
    Thanks anyway

This discussion has been closed.