- Welcome, Guest. Please Login or Register
MindFusion  
  We are soon releasing MindFusion.JavaScript pack. Initial version includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are the beta version and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Timetable Expanding Appointments
Read 1132 times

Nika   Offline
YaBB Newbies
*
Posts: 7
I Love MindFusion!


   
     
 
Timetable Expanding Appointments
Dec 20th, 2018 at 2:14pm
 
Hello!

I would like to expand an appointment by clicking on it or by hovering over it. I couldn't find any useful function to do so, so i tried to set the EndTime of the appointment to a time, where the appointment is fully seen. This works so far. But when I try to set it to the old EndTime, the ItemModifying event isn't called and I don't know how to call it manually.

Is there any better solution to this? And if not, how can I call this event?

This is what I have so far:

Code (CSS):
private void calendar_ItemClick(object sender, MindFusion.Scheduling.Wpf.ItemMouseEventArgs e)
        {
                MyAppointment app = (MyAppointment)calendar.ItemSelection.Items[0];
                actualEndTime = app.EndTime;
                app.EndTime = app.StartTime + new TimeSpan(2, 30, 0);
        }
 



(this method works)

Code (CSS):
private void calendar_ItemDeselecting(object sender, MindFusion.Scheduling.Wpf.ItemConfirmEventArgs e)
        {
            MyAppointment app = (MyAppointment)e.Item;
            app.EndTime = actualEndTime;
        }
 


(this doesn't)

Thanks for your answer in advance!
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1718
Gender: male
tech.support


   
     
 
Re: Timetable Expanding Appointments
Reply #1 - Dec 21st, 2018 at 9:00am
 
Hi,

If only problems is running some code from ItemModifying event handler, you could refactor it extracting to a separate function and then calling the function from both ItemModifying and ItemDeselecting handlers. You might also consider displaying some separate dialog / window on top of the item to implement expand instead of changing its end time.

Regards,
Slavcho
Mindfusion
 
 
 
IP Logged    
 
     

Nika   Offline
YaBB Newbies
*
Posts: 7
I Love MindFusion!


   
     
 
Re: Timetable Expanding Appointments
Reply #2 - Dec 21st, 2018 at 9:24am
 
The code in the ItemModifying handler isn't important at all. What I mean is that the appointment doesn't get smaller when I set the EndTime to earlier.

I already had a window like that, but my boss clarified that he wanted to see the Item expanded and not in another dialogue, so I tried it with setting the EndTime. But I guess I'll have to go back to the roots.

Thanks for your fast answer!  Smiley
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1718
Gender: male
tech.support


   
     
 
Re: Timetable Expanding Appointments
Reply #3 - Dec 21st, 2018 at 9:56am
 
There's no reason for app.EndTime assignment to fail. Have you verified the actualEndTime variable value hasn't changed meanwhile, e.g. from a second click while item is expanded?

Regards,
Slavcho
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print