jQWidgets Forums

jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable jqxSortable: Remove an Element

This topic contains 1 reply, has 1 voice, and was last updated by  Klaus H 8 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxSortable: Remove an Element #85703

    Klaus H
    Participant

    Hi,

    the jqxSortable widget is basically the widget I was looking for regarding a customer specification that I have.

    I need to display data and make it sortable, which is of course the basic function of this widget. I also need to be able to add data to the widget, which works by appending the corresponding html and call $(“#sortable”).jqxSortable(); again. So far, so good.

    What i would also need is the functionality to remove data from the sort. Is this possible anyhow? Maybe a possibility would be use connected lists and move one entry from my primary list to a secondary list and by an event (received?) on the secondary list clear the list immediately with:
    $(“#sortable”).html(”);
    $(“#sortable”).jqxSortable();

    Maybe there is a simpler way?

    Can it be problematic if I have entries with an identical id when I want to remove data? I can have the same data several times in the sort, and if a moving to a connected list uses the id, then I have to use a workaround – within one jqxsortable, there seems to be no problem with that (e.g. receiving the result via toArray).

    Thank You in Advance!

    Best Regards
    Klaus

    jqxSortable: Remove an Element #85732

    Klaus H
    Participant

    Quick Followup:
    The solution works, but the received or removed events are never triggered, so I empty the second sortable always when the stop event of the primary sortable is triggered. That’s more often than needed but does not seem to be a problem.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.