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 08:34 AM UTC

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.
Up arrow icon