- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing spreadsheet component for Java Swing. We have released our Java Swing Pack.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
One row/task
Read 175 times

Ionut Murarasu   Offline
YaBB Newbies
*
Posts: 8
I Love MindFusion!


   
     
 
One row/task
May 17th, 2017 at 12:07pm
 
Hello,

Please take a look in the attachment image.
I want to block the user to add more than one appointments in the same task like in the example from the image.
I want to have only one appointment for the same task.
Can Awt Calendar stop the user from extend the task in more than one row ?
 
 

jPlanner.JPG (66 KB | 32 )
jPlanner.JPG
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1761
Gender: male
MindFusion support


   
     
 
Re: One row/task
Reply #1 - May 17th, 2017 at 1:02pm
 
Hi,

You can listen to the itemModifying event of the Calendar and ensure that the moved item does not collide with another item. The following code illustrates how:

Code:
calendar.addCalendarListener(new CalendarAdapter() {
	@Override
	public void itemModifying(ItemModifyConfirmEvent e) {
		if (calendar.getSchedule().getAllItems(e.getNewStartTime(), e.getNewEndTime(), e.getResource()).size() > 1)
			e.setConfirm(false);
	}
}); 


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