Click here to Skip to main content
16,016,306 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to display combobox text area with icon
like [(Flag icon)+91 V]

What I have tried:

<DxComboBox Data="@NaDSet"
                              @bind-Text="NwDset.Nationality"
                              @bind-Value="@NwDset.Nationality"
                              CssClass="cw-480" NullText="Nationality"
                              FilteringMode="@DataGridFilteringMode.Contains"
                              TextFieldName="@nameof(Nationality.Nationality1)"
                              ValueFieldName="@nameof(Nationality.Nationality1)">

                      <ItemTemplate>
                          <div class="combobox-item-template">
                              <img src="@GetImageFileName(context)" />
                              <div class="combobox-item-template-text">
                                  <span>@context.Nationality1</span>
                              </div>
                          </div>
                          @{
                              Flag = "NationalFlag/" + @NwDset.Nationality + ".png";
                          }
                      </ItemTemplate>
                  </DxComboBox>
Posted
Updated 16-Nov-22 4:24am

1 solution

The best place to ask questions on DevExpress Components is in their Support Forums: Tickets | DevExpress Support[^]

DevExpress also has support documentation with examples that answer your question: DxComboBox<TData, TValue> Class | Blazor | DevExpress Documentation[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900