Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Display appointment time while dragging (Read 8409 times)
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Display appointment time while dragging
Sep 6th, 2011 at 2:42pm
Print Post  
I want to show the user the appointment start time as they drag an appointment in timetable view. Can this be done? If so, any snippet of code would be greatly appreciated.

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Display appointment time while dragging
Reply #1 - Sep 7th, 2011 at 6:28am
Print Post  
You can use custom-drawing (of items or timetable cells) or position a small label on top of the calendar and display the label only when the user drags an item. Both techniques are demonstrated in the Drag & Drop sample.

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #2 - Sep 7th, 2011 at 2:13pm
Print Post  
Hi Meppy,
Thank you for the quick reply.

I have a problem with the samles. I am using VS2008 on Windows 7. I opened the Drag/Drop sample and it worked fine. But when I made a change and saved the main form, all of the components disappeared. The user code is still there. Where can I get the samples. I am concerned to reinstall the demo version of Mindfusion as I do not know what it might do to my live version.

This has happened on other demos too. What causes that behavior?

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Display appointment time while dragging
Reply #3 - Sep 7th, 2011 at 2:38pm
Print Post  
I suspect this is somehow related to the custom base form we are using in the samples. Try with the following version where the BaseForm dependency is removed:

https://mindfusion.eu/_samples/_sample_DragDrop4.zip

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #4 - Sep 7th, 2011 at 3:28pm
Print Post  
I forgot to mention that I am using VB.Net not C#.

It looked like the sample you sent still used the custom base form. And when I tried to run it, I got an error referencing the license. After that I could not open the project again.

Can you send a VB.Net version without the custom base form?

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Display appointment time while dragging
Reply #5 - Sep 8th, 2011 at 6:26am
Print Post  
Check this one:

https://mindfusion.eu/_samples/_sample_DragDropVB.zip

If the license file is giving you troubles, delete it.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #6 - Sep 8th, 2011 at 1:53pm
Print Post  
That looks great! Thanks.

John
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #7 - Sep 9th, 2011 at 2:21am
Print Post  
Hi Meppy,
For some reason my calendar.DragOver event does not fire when I drag an appointment. What might I be doing wrong?

Thanks,
John
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #8 - Sep 9th, 2011 at 2:50am
Print Post  
I think I see my issue form some other posts. The windows dragover event is not firing because I am not dragging another component over the calendar but rather the calendar is creating that effect.

If that is so, how can I show the user the current appointment time as they drag the appointment within the calendar? In previous posts you mentioned handling the ItemModified event but that seems to fire only when you drop the appointment and I want to update the info as they are dragging it.

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Display appointment time while dragging
Reply #9 - Sep 9th, 2011 at 5:58am
Print Post  
You need to handle the ItemModifying event.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #10 - Sep 9th, 2011 at 1:57pm
Print Post  
I tried that but the time reported in ItemModifying using e.Item.StartTime does not agree with the ItemModified value. I am using 30 min cell time and it is off +/- 1 to 2 minutes every time. I need it to be exact.

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Display appointment time while dragging
Reply #11 - Sep 9th, 2011 at 2:23pm
Print Post  
Try the NewStartTime and NewEndTime properties of the accompanying EventArgs object instead of directly accessing the item's properties.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Display appointment time while dragging
Reply #12 - Sep 9th, 2011 at 2:28pm
Print Post  
That work great. Thank you!

John
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint