3 Answers, 1 is accepted
0
Hello Richa,
You could review the online demo below, which provide basic approach for achieving drag and drop functionality with RadListView. the same could be easily customized to drop into another ListView control following the provided logic.
http://demos.telerik.com/aspnet-ajax/listview/examples/itemdragdrop/defaultcs.aspx
Regards,
Maria Ilieva
Telerik
You could review the online demo below, which provide basic approach for achieving drag and drop functionality with RadListView. the same could be easily customized to drop into another ListView control following the provided logic.
http://demos.telerik.com/aspnet-ajax/listview/examples/itemdragdrop/defaultcs.aspx
Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Richa
Top achievements
Rank 1
answered on 24 Jan 2014, 05:12 AM
Hi Maria,
I have Implemented this code but this is not working in all browsers except Internet Explorer.
Thanks,
Richa
I have Implemented this code but this is not working in all browsers except Internet Explorer.
Thanks,
Richa
0
Hello Richa,
Try the code below which works on every browser on my end:
and let me know if it works for you.
Regards,
Maria Ilieva
Telerik
Try the code below which works on every browser on my end:
div>
<
telerik:RadListView
runat
=
"server"
ID
=
"RadListView1"
>
<
ItemTemplate
>
<
div
class
=
"rlvI"
>
<
telerik:RadListViewItemDragHandle
ID
=
"RadListViewItemDragHandle1"
runat
=
"server"
/>
data....
</
div
>
</
ItemTemplate
>
<
ClientSettings
AllowItemsDragDrop
=
"true"
>
<
ClientEvents
OnItemDropping
=
"itemDropping"
/>
</
ClientSettings
>
</
telerik:RadListView
>
</
div
>
<
div
>
<
telerik:RadListView
runat
=
"server"
ID
=
"RadListView2"
>
<
ItemTemplate
>
<
div
class
=
"rlvI"
onmouseover='itemMouseOver("<%#Container.DisplayIndex %>")' onmouseout='itemMouseOut();'>
data....
</
div
>
</
ItemTemplate
>
</
telerik:RadListView
>
</
div
>
<
script
type
=
"text/javascript"
>
var currentDestinationIndex = -1;
function itemDropping(sender, args) {
var destIndex = currentDestinationIndex;
alert("dragged item index:" + args.get_itemIndex());
if (destIndex > -1) {
alert("destination index:" + destIndex);
}
else {
alert("Not over RadListView2 items");
}
}
function itemMouseOver(displayIndex) {
//save the id in a variable when dragged item is over
currentDestinationIndex = displayIndex;
}
function itemMouseOut() {
//clear the variable if dragged item leaves
//destination item boundaries
currentDestinationIndex = -1;
}
</
script
>
Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.