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

Drag enabling/disabling

1 Answer 15 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Terry Newton
Top achievements
Rank 1
Terry Newton asked on 12 May 2010, 05:53 PM

 

 

 

 

 

I am trying to fully control the look of dragging items within the week and day mode on the calendar.  I have used the query events and this works, but I want to do better and prevent the changes to the look that happen when an appointment is attempted to be dragged and I do not want to allow it.  It seems like I should be able to stop this before it begins rather than after when the UI has dropped the image of the appointmewnt already.

I am trying:

Dim
oAppointments As IList(Of AppointmentItem) = Me.ctlCalendar.ChildrenOfType(Of AppointmentItem)()

 

 

 

For

 

 

Each oAppointmentItem In oAppointments
[some logic to set bDragPossible]

 

 

 

oAppointmentItem.SetValue(DragDrop.

 

RadDragAndDropManager.AllowDragProperty, bDragPossible)
Next

The problem I am running into with this is that even though I call this on the items I wish to diable drag on with a bDragPossible of false, it is ineffective and in the IDE I do not see any property on the AppointItem for the AllowDrag like there is for the allowDrop, so I think it is ignoring this attempt.

How can I shut down dragging at the source before it starts?

 

1 Answer, 1 is accepted

Sort by
0
Terry Newton
Top achievements
Rank 1
answered on 12 May 2010, 08:14 PM

Nevermind.

DragDrop.

 

RadDragAndDropManager.SetAllowDrag(oAppointmentItem, bDragPossible)

Appears to do the trick.

 

Tags
Calendar
Asked by
Terry Newton
Top achievements
Rank 1
Answers by
Terry Newton
Top achievements
Rank 1
Share this question
or