Not able to preselect the radzen dropdown value on page load blazor

Radzen dropdown doesn't preselect my values on load .

Here my code , i am not understanding why it is not picking up can you guys share some light would be great.

<RadzenDropDown TValue="string" class="w-100"
Data=@Text.Where(x=>x.Language=="en").Select(c=>new {
Code=c.Code,
Value=c.Values.FirstOrDefault(x=>x.Key=="default").Value
})
TextProperty="Value"
ValueProperty="Code"
@bind-Value=@_selected
AllowClear="false"
AllowFiltering="true"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
Multiple="false">

In my Code behind i have something like

Protected string _selected;

protected override void OnInitialized()
{
_selected = Text.FirstOrDefault(x => x.Code ==
Existingrecord.Code).Value;
}

i expect dropdown to show me me what ever value is present in the _selected but it doesn't show anything .

Your Data property is bound to expression which will be reevaluated on every state change and will return new objects every time - no selection can be preserved with such binding. You can assign this to a variable when the page is initialized to avoid such problems.

@enchev Thank you I can do that but do you also know how can i give expression in TextProperty Of the radzen dropdown ?

I have my object as some thing like below

[
{
id: 1,
Code:"hello"
Values: [
{
Key=default,
Value="How are you"
}
]
},
{
id: 2,
Code:"good"
Values: [
{
Key=default,
Value="I am good"
}
]
},
]
I want my TextProperty to use "Value" so that it displays such values like "How are you" ,"I am doing good" from given above example . looking at documentation i can't really find any . would be great if you can share some light,

@Sumanth_Sharma

Working with these components is always easier when you have a class for the underlying items.

image
In the code block: