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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Editor template per event

Thread ID:

Created:

Updated:

Platform:

Replies:

144166 Apr 23,2019 09:26 AM UTC Apr 24,2019 09:58 AM UTC React - EJ 2 1
loading
Tags: Schedule
aaa
Asked On April 23, 2019 09:26 AM UTC

Is it  possible to have editor window different for different events?

seems editorTemplate function executes  once and  just use evaluated template later


Or maybe its possible to configure fields definitions to make  some fields readonly/hidden in editor?
can I use any conditions based on event data in editor?

Nevitha Ravi [Syncfusion]
Replied On April 24, 2019 09:58 AM UTC

Dear Customer, 

Greetings from Syncfusion Support. 

We have prepared sample to hidden some of the fields from the editor window based the value of EventType field which can be viewed from the following link. 

  onPopupOpen(args) { 
    if (args.type === 'Editor') { 
      let statusElement = args.element.querySelector('#EventType'); 
      statusElement.setAttribute('name', 'EventType'); 
      if (args.target.classList.contains("e-appointment")) { 
        if (args.data.EventType == 'Confirmed') { 
          classList(args.element.querySelector("#summaryRow"), ["disable"], ["enable"]); 
          classList(args.element.querySelector("#reasonRow"), ["disable"], ["enable"]); 
        } 
        else if (args.data.EventType == 'Requested') { 
          classList(args.element.querySelector("#reasonRow"), ["disable"], ["enable"]); 
          classList(args.element.querySelector("#summaryRow"), ["enable"], ["disable"]); 
        } else if (args.data.EventType == 'New') { 
          classList(args.element.querySelector("#summaryRow"), ["enable"], ["disable"]); 
          classList(args.element.querySelector("#reasonRow"), ["enable"], ["disable"]); 
        } 
      } else { 
        classList(args.element.querySelector("#summaryRow"), ["enable"], ["disable"]); 
        classList(args.element.querySelector("#reasonRow"), ["enable"], ["disable"]); 
      } 
    } 
  } 

.disable { 
  display: none; 
} 
.enable { 
  display: table-row; 
} 

Please try out the sample and revert us back if you need any further assistance. 

Regards, 
Nevitha 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon