How to Add existing Dropdown to Pivot-View Toolbar

I'm using PivotView and I have a drop-down on same page.

<div class="dropdown-controls">
   <ejs-dropdownlist class="pivot-table-dropdown" id='ddlDistribution' [dataSource]='distribution'
      [fields]='distributionFields' [(value)]="distriButionType" placeholder='Edit Mode'>
    </ejs-dropdownlist>
</div>

<div>
    <ejs-pivotview #pivotview id='PivotView' [editSettings]='editSettings'
       [dataSourceSettings]='dataSource' height='{{height}}' showGroupingBar='true' allowCalculatedField='true'
       (cellSelected)='cellSelected($event)' (drillThrough)="editCell($event)" [gridSettings]='gridSettings'
       showToolbar='true' [toolbar]='toolbarOptions' (toolbarRender)='beforeToolbarRender($event)'
       [showTooltip]='showTooltip' (dataBound)='dataBound()' (paste)="paste($event)"
       allowConditionalFormatting='true' allowDeferLayoutUpdate='true' (created)='created()'
       allowExcelExport='true' showFieldList='true' (enginePopulated)='enginePopulated($event)' tooltipTemplate='<span>${value}</span'>
    </ejs-pivotview>
 </div>

I'm using toolbar like below:

beforeToolbarRender(args: any) {
    args.customToolbar.splice(20, {...object goes here...} )
}

Is there any way I can add my existing drop-down (i.e. ddlDistribution) to Pivot-View toolbar?

1 Reply 1 reply marked as answer

SN Sivamathi Natarajan Syncfusion Team July 3, 2020 01:51 PM UTC

Hi ShreeKumar, 
 
Thanks for contacting Syncfusion support. 
 
Based on your requirement we have prepared a sample to add drop down list in toolbar module. Please check the below sample for your reference. 
 
 
We hope the above sample meets your requirements. 
 
Regards, 
Sivamathi. 


Marked as answer
Loader.
Up arrow icon