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

Adding custom button in Left Corner

Thread ID:

Created:

Updated:

Platform:

Replies:

146494 Aug 6,2019 08:51 AM UTC Aug 9,2019 03:45 AM UTC Angular - EJ 2 3
loading
Tags: Schedule
chevron
Asked On August 6, 2019 08:51 AM UTC

Hello,

I'd like to add my own button in the top/left corner zone, but i did not find how i can do it, i've tried using the DOM but the element is not finded and when i get the parent it has no children ? maybe the scheduler is not totally loaded in the DOM ? i'm trying accesing it with this method(actionComplete)='onActionComplete($event)'
can you help me ?

let headerBar: HTMLElement = document.getElementsByClassName('e-resource-left-td')[0] as HTMLElement; // return undefined ???

let tdResourceLeft: Element = document.getElementsByClassName('e-table-container')[0]; // finded but has no children ???

Thanks !




Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 7, 2019 03:45 PM UTC

Hi Chevron 
  
Syncfusion greetings. 
 
We can achieve your requirement using renderCell event and kindly refer the below sample. 
 
onRenderCell(args: RenderCellEventArgs): void { 
    if (args.elementType === 'emptyCells') { 
      if (args.element.querySelector('.e-resource-left-td button') === null) { 
        let inputEle: HTMLInputElement = createElement('button', { 
          className: 'e-field', innerHTML: 'Click Me', attrs: { name: 'EventType', value: 'Click Me', onClick: 'alert("Button Clicked")' } 
        }) as HTMLInputElement; 
        args.element.appendChild(inputEle); 
      } 
    } 
  } 
 
 
Regards, 
Karthi 


chevron
Replied On August 8, 2019 01:53 PM UTC

Thanks a lot!

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 9, 2019 03:45 AM UTC

Most welcome 😊 


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