Page 1 of 1

ListView data-selectable examples

Posted: Thu May 02, 2019 4:12 pm
by Fabrizio
Hi,
Could someone show me how to manage items using selectable options? How can i retrieve all the items selected using javascript?

For example: how can i DELETE ALL the selected items?
This routine delete only last selected item:

<button class="button" onclick="
var lv = $('#lv_1');
lv.data('listview').del(lv.find('.current'))
">Delete item</button>

But, if i want to delete multiple items?

Re: ListView data-selectable examples

Posted: Thu May 02, 2019 4:20 pm
by olton

Code: Select all

getSetected() - return all selected nodes

Re: ListView data-selectable examples

Posted: Thu May 02, 2019 4:30 pm
by Fabrizio
How can i use getSelected() on the following <button> tag?

<button class="button" onclick="
var lv = $('#lv_1');
lv.data('listview').del(????))
">Delete item</button>

Re: ListView data-selectable examples

Posted: Thu May 02, 2019 5:31 pm
by olton

Re: ListView data-selectable examples

Posted: Thu May 02, 2019 5:44 pm
by Fabrizio
It works! Thank you! You are very kind