This is a migrated thread and some comments may be shown as answers.

Need a DragDropBehavior solution

3 Answers 92 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 21 Apr 2014, 09:01 PM
Hi,

I created a usercontrol base on a ScheduleView. My user control contain a "OnCanDrop" event and a "SetDataSource" method. When I create my UserControl, I fill the view with ReadOnly slots. The user can use the "SetDataSource" method to fill the view with "Appointments" and "SpecialSlots". Appointments is for appointments and SpecialSlots is for open slots where user can drag apointments into it of where user can create new appointments.

My objects (appointments and special slots) contain specifics members for logical purpose.

What I'm trying to do in my a drag and drop behavior, it's to raise my event with the source appointment the user is dragging and the specialslot where the user is trying to drop or drag over so the user can decide if the appointment is trying to drag can be drop or not on the specialslot I raised through my event base on a logic he decided.

If I have an appointment from 8h00 to 8h15 and I want to drag it in the special slot 8h15 to 8h30. I want to raise my event only when I'm over the special slot not after each mouse move of my appointment.

Thank's
Alain

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 22 Apr 2014, 09:58 AM
Hello Alain,

I have already answered you almost the same question in the following forum thread:
http://www.telerik.com/forums/detexting-if-i-am-on-the-same-slot

You didn't answered anything there, did you give it a try and if so why it didn't work for you? I'm afraid this would be only solution for the desired scenario we can suggest with the current implementation of the ScheduleView.

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Christie Admin
Top achievements
Rank 1
answered on 22 Apr 2014, 01:14 PM
Hi Kalin,

I'm sorry I didn't get the reply :(

I cannot use SnapAppointments in my approach because I need to let the user drag an appointment to a minute close to his current start time.

Regarding the other issue, with the destinationslots, I need to cast it in my own object to access a specific member when raizing my vent?!?

Thank's
Alain
0
Kalin
Telerik team
answered on 23 Apr 2014, 02:15 PM
Hi Alain,

As Yana has already explained in the other this forum thread the only solution for the DestinationSlots question would be to manually check whether the SpecialSlots collection contains a Slot that overlaps with the destination one using the IntersectsWith extension method. Check the attached sample project which demonstrates the exact approach.

Hope this will work for you.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ScheduleView
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Christie Admin
Top achievements
Rank 1
Share this question
or