Hello,
I'd like the component empty when I load the page and display values when I type a caracter in the search bar. The products variable contains the right result (few records) but I don't see the result in the component.
Do you have an idea what's wrong ?
Thanks,
<RadzenDropDownDataGrid
@bind-Value=value
Data=@products
LoadData=@LoadData
AllowVirtualization="true"
AllowClear="true"
AllowFiltering="true"
TextProperty="Name"
AllowSorting="false"
ValueProperty="Id" />
@code {
IEnumerable<MyModel> products = new List<MyModel>();
string value;
int Id = 0;
async Task LoadData(LoadDataArgs args)
{
products = await MyService.SearchProduct(args.Filter);
await InvokeAsync(StateHasChanged);
}
}
public class MyModel
{
public int Id { get; set; }
public string Name { get; set; }
}