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. Image for the cookie policy date

How to open the Formula Insertion Dialog programmatically?

Hello team,

I am building a project about Spreadsheet, using Syncfusion Spreadsheet React, and trying to customize the Ribbon toolbar.

Is there any method to open the Formula insertion modal window?

 


1 Reply

SP Sangeetha Priya Murugan Syncfusion Team October 18, 2022 03:34 AM

Hi Anton,


Your requirement can be achievable by calling the click event for insert function button after switching the tab as like as below.


CODE BLOCK:


 

 

function opendialog() {

    const ribbonTabObj = getComponent(

      document.getElementById(spreadsheet.element.id).querySelector('.e-tab'),

      'tab'

    );

    ribbonTabObj.selectedItem = 3;

    ribbonTabObj.dataBind();

    document.getElementsByClassName('e-insert-function')[1].click();

  }

 


Sample Link: https://stackblitz.com/edit/react-zf4dqu-e2dkaa?file=index.js


Kindly get back to us if you need further assistance regarding.


Regards,

Sangeetha M                   


Loader.
Live Chat Icon For mobile
Up arrow icon