javascript - Get Selected Items of listview syncfusion -


i want show selected items of listview in grid. selected items should show on home page. cant find way so. have attached js file code , screenshot of popup

var subitemsloaded = false,      subitemselectionmodalid = '#subitemselectionmodal';  listviewheight = 400,  subitemclicked = 0;    $(subitemselectionmodalid).on('shown.bs.modal', function () {      if (          (window.selections.assettemplate.id != null &&          window.selections.assettemplate.id != 0)) {          $(subitemselectionmodalid + ' .modal-body').ejwaitingpopup({              showoninit: true          });          $(subitemselectionmodalid + ' .listviewitems').ejlistview({              "height": 400,              "loadcomplete": function () {                  repositionsearchboxfor(subitemselectionmodalid);                  var obj = $(subitemselectionmodalid + ' .modal-body').data("ejwaitingpopup");                  console.log("12345.5");                  obj.hide();                  console.log("123456");              },                "mouseup": function (e) {              },              "enableajax": true,              "enablecheckmark": true,              "enablefiltering": true,              "datasource": ej.datamanager({                  "url": "/shared",                  "cachingpagesize": 0,                  "timetillexpiration": 0              }),              "query": ej.query().from("getsubitems").addparams("assettemplateid", window.selections.assettemplate.id).addparams("assettemplatevariantid", window.selections.assettemplatevariant.id),              "fieldsettings": {                  "text": "subitemname",                  "id": "subitemid"              }          });      }  });    $(subitemselectionmodalid).on('hidden.bs.modal', function () {      var listviewitems = $(subitemselectionmodalid + ' .listviewitems');      if (listviewitems.find('ul').length > 0) {          var selections = $(subitemselectionmodalid + ' .listviewitems').ejlistview("getcheckeditems");          if (selections.length > 0) {              $('#selectedsubitems').html(selections.join(' , ')).removeclass('hidden');          }      }  });

enter image description here

yes, possible show selected items of listview in grid. this, have use mouseup event of listview take selected items of list , give these selected items datasource grid control.

also in order id of selected list, have id attribute , take id , bind id field 1 of columns of grid control. way, can id of particular list in listview , bind grid.

we have prepared sample reference: http://jsplayground.syncfusion.com/prahqy2i

regards,
arun p.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -