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

How to access resource data in quickInfo dialog when adding new event?

Thread ID:

Created:

Updated:

Platform:

Replies:

150446 Jan 7,2020 04:02 PM UTC May 7,2020 05:31 AM UTC React - EJ 2 3
loading
Tags: Schedule
Edward Butler
Asked On January 7, 2020 04:02 PM UTC

When I click an empty cell to add a new event, the only values captured are StartTime, EndTime, IsAllDay and elementType. I need to capture the ID or name of the staff member (resource) in the column where the appointment is being created. How can I access this data?

Vengatesh Maniraj [Syncfusion]
Replied On January 8, 2020 10:31 AM UTC

Hi Edward, 
 
Greetings from Syncfusion Support. 
 
Based on the requirement, we have prepared below sample which displayed the resource details in quickInfoTemplate. 

Kindly try the above and revert us for further assistance with this. 

Regards, 
Vengatesh 


Sudhanshu Jain
Replied On May 6, 2020 10:36 AM UTC

Hi Syncfusion,

This above solution does not work. Still if we click on empty cell , resource id Or name is not coming in the data.How we can access empty cell data?

Vengatesh Maniraj [Syncfusion]
Replied On May 7, 2020 05:31 AM UTC

Hi Sudhanshu, 

Greetings from Syncfusion Support. 

We have validated your query that “how to get resource data when clicking on empty cell” at our end and we let you know that the scheduler does not pass the resource data while clicking on the empty cell. So we suggest you please use the popupOpen and popupClose events to get the resource details from the target element like the below code. 

onPopupOpen(props) { 
    if ( 
      props.type === "QuickInfo" && 
      props.target.classList.contains("e-work-cells") 
    ) { 
      var currentResourceIndex = parseInt( 
        props.target.getAttribute("data-group-index") 
      ); 
      var drowDownList = new DropDownList({ 
        dataSource: this.categoryData, 
        fields: { text: "text", value: "id" }, 
        placeholder: "Resource Name", 
        index: currentResourceIndex 
      });       
      drowDownList.appendTo(props.element.querySelector(".resourceName")); 
    } 
  } 
  onPopupClose(args) { 
    var selectedIndex = args.element.querySelector('.resourceName').ej2_instances[0].value; 
    var resourceId = this.categoryData[selectedIndex - 1].id; 
    args.data.ResourceId = resourceId; 
  } 

For the same, we have prepared the sample which is available in the below link. 


Please check the above sample and get back to us for further assistance. 

Regards, 
Vengatesh 


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