Radzen Value Property

Hello. This can be repeated or easy question but i really don't know the answer and i couldn't find the answer. How can i bind my objects to ValueProperty for example. I have a dropdown that looks like that. I want to bind my object to a list not my Id only.

<RadzenDropDown Name="ArpDropdown" Disabled="@DisableArpDropDown" Class="w-100"
                                  Placeholder="SlipComponent"
                                  LoadData=@LoadDataVirtualization
                                  AllowFiltering="true"
                                  Data=@DisplayArpList
                                  TextProperty="Name"
                                  Multiple="true"
                                  ValueProperty="Id"
                                  Change=@(CreateArpIdList)
                                  @bind-Value="@SelectedArpIdList" />

my class is

public class ArpModel : IModel
    {
        public int Id { get; set; }
        public string Code { get; set; }
        public string Name { get; set; }    
    }

If you want to work directly with objects instead object properties you should not set ValueProperty. In this case @bind-Value also should be bound to list of objects.

1 Like