Fill data to more control's values with selected data

I want to select one value of a combo box (foreign key), then from this value the form can auto fills other values of controls ?


Hi @Dzung,

All form components are two-way bound using @bind-Value:

<RadzenTemplateForm TItem="TestBlazor.Models.Sample.OrderDetail" Data="@(orderdetail)" Visible="@(orderdetail != null && canEdit)" Submit="@Form0Submit">
        <RadzenNumeric style="display: block; width: 100%" @bind-Value="@(orderdetail.Quantity)" Name="Quantity">
        <RadzenDropDown Data="@(getOrdersResult)" TextProperty="UserName" ValueProperty="Id" Placeholder="Choose Order" style="width: 100%" @bind-Value="@(orderdetail.OrderId)" Name="OrderId">

When you change a value of a form component this will set immediately the property in your model - you can implement your login directly in your model.

Similar example of components dependent on other components can be found here:

Hi @enchev,
May be I said unclear. I have a form with some data fields f01, f02, f03, one of them is a FK (F01) get from a drop down control linked to other table (tb02). I want when I selected a value filled in F01, then F02 initialized by a field value from tb02 comming with FK(F01). F02 is two-way binding as usual.

Pls help how to do it.

Best Regards,