TextProperty not displayed when binding complex type to DropDown


I'm using Radzen Blazor components(3.18.3).
This is how DropDown is defined:

<RadzenDropDown style="width: 100%" @bind-Value="@value" TextProperty="Data" ValueProperty="Id"  Data="@list">

This is how Data, value and class are defined:

public class UserFieldInfo
        public int Id { get; set; }
        public string TableName { get; set; }
        public string FieldGroupType { get; set; }
        public string Data { get; set; }

UserFieldInfo value = new UserFieldInfo() { Id = 1, Data = "Test1" };
IEnumerable<UserFieldInfo> list;
list = new List<UserFieldInfo>()
    new UserFieldInfo(){ Id = 1, Data = "Test1" },
    new UserFieldInfo(){ Id = 2, Data = "Test2" },
    new UserFieldInfo(){ Id = 3, Data = "Test3" },

My expectation is that after page is loaded the very first element of list is selected in the dropdown and "Test1" is displayed in that dropdown. Instead nothing is displayed in the dropdown and selection is somehow borked. E.g.


Am I missing or misunderstanding something? How do I bind such object and display respective TextProperty?


This should be:

Ok, thanks, that does it.
But what if I want to return the object itself( On Change ), I figure that the following code is doing that, but the "Data" is not displayed.

<RadzenDropDown style="width: 100%" @bind-Value="@value" TextProperty="@nameof(Data)" ValueProperty="@nameof(value)" Change="Change" Data="@list">

In this case you should not use ValueProperty or you can stay with the current configuration and find the object by Id from your collection.

Thanks for the help!