We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Drag & Drop

Thread ID:

Created:

Updated:

Platform:

Replies:

68767 Oct 1,2007 10:05 AM Mar 27,2008 08:30 AM Windows Forms 8
loading
Tags: ScheduleControl
Samy Abou-Shama
Asked On October 1, 2007 10:05 AM

Hi,

I tried to implement the D&D functionality. Unfortunatly I am confused and don't know what events to use (calender, ScheduleHost ...).
As a work arround I thought I just turn the d&d off ... but could not even find a property for that.

Do you have a tutorial for D&D or could you point me to right location in the Help?

Thank you

Administrator [Syncfusion]
Replied On October 1, 2007 11:52 AM

What do you mean by drag and drop?

In the samples we ship, you can mousedown on one appointment and move it to another location? Do you need some kind of drag and drop support beyond this default support that we provide out of the box?

Samy Abou-Shama
Replied On October 1, 2007 12:41 PM

Sorry for not being specific :-)

I meant dragin a ScheduleItem from one date to another.

Administrator [Syncfusion]
Replied On October 1, 2007 01:35 PM

This is supported out of the box in the recurring appointment sample we ship. You can drag an appointment from one date to another in a Month view, or week view or Work Week or Custom view.

You can also drag an appointment from one of these views and drop it on a date in the Navigation Calendar.

There would be no need to handle any grid events to get this support.

Samy Abou-Shama
Replied On October 1, 2007 02:12 PM

Thank you for the quick answer.

Here is my problem. My ScheduleItems are directly connected to the DB.
Where would I implement the 'persist' of the changed items (changed via d&d)?

Administrator [Syncfusion]
Replied On October 1, 2007 02:38 PM

There is a this.scheduleControl1.ItemChanged event that you can subscribe to and catch any changes that are made to the appointment items.

Administrator [Syncfusion]
Replied On October 2, 2007 04:17 AM

Here is that sample modified to do a Console.WriteLine showing the appointment when an appointment is edited or dragged.

The editing is caught using ScheduleControl.ItemChanged.

To catch the D&D, a derived grid is used. To do this, you derive the ScheduleControl and override CreateScheduleGrid. There, you provide an instance of your derived ScheduleGrid. The code in the derived schedule grid catches the original appointment, and then the dropped appointment. It does require accessing some internal members to do this. At the point of the WriteLine, you could call a member of the ScheduleControl (you would need to add it to your derived schedulecontrol) that would raise a new ScheduleControl ItemDropped event (that you aould also need to add).

We will explicitly add support for such an event in the next release.

SampleSchedule.zip

kusumapriya
Replied On March 27, 2008 05:42 AM



>Hi,

I tried to implement the D&D functionality.But i Dnt no how to write the code for that, plz help me to get that information. BR>
Thank you


Anonymous
Replied On March 27, 2008 08:30 AM

As mentioned above, the normal D&D of appointments around the schedule is supported out of the box. Exactly what kind of D&D are you trying to do that is not part of the built-in support?


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;