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
close icon

Creating multiple dropdowns with different dataSource

Hello, 

how can I create multiple dropdowns with different data source?


Is there a way to put an identifier in the dropdown inside the ngFor and then changing the dataSource of that particular dropdown?


Thank you

    <div *ngFor="let type of dataTypes; let i = index">
      <div id="wrapper" style="margin-top: 20px">
        <div id="content" style="margin: 0px auto; width: 250px">
          <ejs-multiselect
            #types
            id="multiselectelement"
            [dataSource]="data"
            [fields]="fieldsCaratteristics"
            [placeholder]="placeholderCaratteristics"
            [popupHeight]="height"
            [changeOnBlur]="false"
            (change)="caratteristicChange($event)"
            [title]="type"
          >
            <ng-template #noRecordsTemplate>
              <span class="norecord">NESSUN DATO DISPONIBILE</span>
            </ng-template>

            <ng-template #actionFailureTemplate>
              <span class="action-failure"> Data fetch get fails</span>
            </ng-template>
          </ejs-multiselect>
        </div>
      </div>
      {{ type }}
    </div>

3 Replies

MZ matteo z. May 2, 2023 10:34 PM UTC

For example, can I select from the [title] the dropdown and change the [dataSource]?



MZ matteo z. May 5, 2023 08:05 AM UTC

We already solved the problem in another way, there is no need for the reply anymore



MR Mallesh Ravi Chandran Syncfusion Team May 8, 2023 03:12 PM UTC

Hi matteo, 


Thanks for your update. Please let us know if you require any further assistance. We are happy to assist you.

Regards,

Mallesh 


Loader.
Live Chat Icon For mobile
Up arrow icon