This lightly modified ComboBox sample won't show the value of the nested class. Filtering does work, so I think this is a bug?
<
TelerikComboBox
@bind-Value=@SelectedValue
Data
=
"@ComboBoxData"
Filterable
=
"true"
ValueField
=
"ProductId"
TextField
=
"ProductName.Description"
>
<
ItemTemplate
>
<
strong
>@((context as Product).ProductName.Description) - @(String.Format("{0:C2}", (context as Product).UnitPrice))</
strong
>
</
ItemTemplate
>
</
TelerikComboBox
>
@code {
public IEnumerable<
Product
> ComboBoxData { get; set; }
public int SelectedValue { get; set; } = 2;
protected override void OnInitialized()
{
List<
Product
> products = new List<
Product
>();
for (int i = 1; i < 10; i++)
{
products.Add(new Product()
{
ProductId = i,
ProductName = new ProductName {Description = $"{i} Product {i}"},
UnitPrice = (decimal)(i * 3.14)
});
}
ComboBoxData = products;
base.OnInitialized();
}
public class Product
{
public int ProductId { get; set; }
public ProductName ProductName { get; set; }
public decimal UnitPrice { get; set; }
}
public class ProductName
{
public string Description { get; set; }
}
}