开发者

Darg n Drop from ListBox to Telerik Scheduler in ASP.NET

开发者 https://www.devze.com 2022-12-11 04:40 出处:网络
I am using a L开发者_运维知识库istbox and Telerik Scheduler in my web page. I need to drag an item from listbox to scheduler control. How can I do that?I know this question is quite old now, but I tho

I am using a L开发者_运维知识库istbox and Telerik Scheduler in my web page. I need to drag an item from listbox to scheduler control. How can I do that?


I know this question is quite old now, but I thought I'd provide an answer to help others that arrive here.

RadScheduler (like all Telerik controls) provides a rich client-side API that makes it possible to write some JavaScript to handle drag-and-drop scenarios. There is a complete demo showing you how to drag-and-drop between a RadGrid and RadScheduler online:

http://demos.telerik.com/aspnet-ajax/scheduler/examples/draganddropintegration/defaultcs.aspx

In this example, you see how to use RadGrid's RowDropping client-side event and RadScheduler's client-side API to determine where an item has been dropped. Ajax is then used to add the appointment to the Scheduler.

To adapt this for a ListBox, you need to have a similar event that can be fired when your ListBox item is dropped. Unfortunately, the default listbox will not provide that, but you can use something like the RadListBox (which has more client-side events, including OnClientDropping). Here, ListBox drag-drop is integrated with a RadTreeView:

http://demos.telerik.com/aspnet-ajax/listbox/examples/applicationscenarios/treeviewdraganddrop/defaultcs.aspxt

I hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消