I have RadzenDropDown whose data comes DB and need to do multiple selection enable, AllowVirtualization enable to avoid lazy loading because this dropdown contain more 2000 product. To do this, I have tried below code but checkbox checked true is not working properly. How can I do?
<label>Product</label>
<RadzenDropDown class="form-control w-100" placeholder="Select Product"
AllowClear="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
FilterOperator="StringFilterOperator.StartsWith"
AllowFiltering="true"
Multiple="true"
LoadData=@searchValueChanged
AllowVirtualization=@isVirtualization
Count="@Count"
@bind-Value="@SelectedValues"
TextProperty="Name" ValueProperty="Code" Data="@_ProductList" Change="@(args => onProductChange(args, 3))" />
Then how can I get checked true product ids with comma separated in the variable productIdList
?
public async Task onProductChange(object value)
{
string productIdList = (value is IEnumerable<object> ? string.Join(", ", (IEnumerable<object>)value) : value).Tostring();
}