Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Item deletion still happens even though we have disabled item editing. (Read 753 times)
Michael Hopkins
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Joined: Apr 5th, 2022
Item deletion still happens even though we have disabled item editing.
Mar 2nd, 2023 at 5:43pm
Print Post  
Hi,

How can we suppress item deletion? We have this in our code.

Code
Select All
 calendar.setAllowDrag(false)
 calendar.setAllowInPlaceCreate(false)
 calendar.setAllowInPlaceEdit(false)
 calendar.setAllowMoveUnselectedItems(false)
 calendar.setAllowAutoScroll(false)
 calendar.setEnableKeyboard(false)
 



But if we highlight and item and hit the delete key it will remove the item from the calendar. Am I missing how to suppress this?

Thanks,

Michael
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Online


tech.support

Posts: 3181
Joined: Oct 19th, 2005
Re: Item deletion still happens even though we have disabled item editing.
Reply #1 - Mar 3rd, 2023 at 9:30am
Print Post  
Hi,

At this time you can prevent it from itemDeleting validation handler -

Code
Select All
calendar.addCalendarListener(new CalendarAdapter() {
	@Override
	public void itemDeleting(ItemConfirmEvent e) {
		e.setConfirm(false);
	} ... 



If you need a read-only view, setting base component.Enabled to false could work too.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint