So many we will get requirement to expand popup width on basis of text Content while working with Blazor Telerik dropdown.
We can do like this
@page "/counter"
<TelerikDropDownList Data="@DropDownData" Width="auto"
Value="@DropDownValue"
ValueChanged="@( (string newValue) => OnDropDownValueChanged(newValue) )">
<DropDownListSettings>
<DropDownListPopupSettings Width="Auto"/>
</DropDownListSettings>
</TelerikDropDownList>
@code {
private List<string> DropDownData { get; set; } = new List<string> {
"Manager", "Developer", "QA", "Technical Writer Technical Write", "Support Engineer"
};
private string DropDownValue { get; set; } = "Developer";
private void OnDropDownValueChanged(string newValue)
{
DropDownValue = newValue;
}
}