i can't figure out how allow multiple items rearranged in listview. how handle 1 item:
protected override void ondragdrop(drageventargs drgevent) { //get target index , other things if (drgevent.data.getdatapresent(typeof(listviewitem))) { listviewitem draggeditem = (listviewitem)drgevent.data.getdata(typeof(listviewitem)); int origindex = draggeditem.index; if (origindex != targetindex) { var e = new rearrangeitemeventargs(origindex, targetindex); onrearrangeitem(e); } } } but after enabling multiselect, drgevent.data still contains listviewitem (and windowsforms10persistentobject, have no idea is).
i expected contain selectedlistviewitemcollection, listviewitemcollection, or listviewitem[], none of them worked.
so how selected items, , not 1 of them?
Comments
Post a Comment