kendo ui - remove selected elements from multi list view -


Using the Candido UI, please tell me how we can extract elements from a multi-list view. When I select any item, it is giving me, but I am unable to remove the selected element.

{Id: 3, text: "lesson 3"}]; Var d = $ ("# listview"). KendoListView ({Data Source: Data, Template: kendo.template ($ ("# template") .html ()), select: "Multiple", change: function () {var index = this.seat (). ), Data item = this.dataSource.view () [index]; var d = $ ("# listview"). Data ("candlestivo"); warning (de.liment. () .first ()); d.remove (DataItem.text); // log ("id:" + dataItem.id + ", text:" + dataItem.text); var selected = $ .map (select it), function (item) {returns Data [$ (item). Index ()]. ​​Id;}); //data.remove(selected.id); //console.log(data); console.log (selected); //console.log ( "[" + Selected.join ("," "" ");}}}); to remove element It is:

  /     

This selected item will remove it as soon as you click it (but doing this in the change event handler does not really allow you to remove many items).

But you can directly remove a single item from the list by using the remove method:

  // Choose selected Var = This. Choose(); Remove d.data ("kendoListView") (selected).   

Check it out, click an item and it will be deleted.

The question is that these interfaces are able to delete a call from one column. If you want to delete a lot, you can iterate over them:

  // Find the selected var items = d.select (); $ .eu (item, function (idx, amm) {d.remove ($ (elem))});   

Check it out, select many and then click the "Remove" button.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -