RadzenDropDown does not scroll to find the item, if the item is not in the visible part.
Thank you.
Indeed there is no such feature however we accept pull requests!
In version 4.18.0 that I have as stable it does work
Selection and scroll to item depends if the DropDown is bound to in-memory collection or not - if the component is bound to IQueryable which is not in-memory no scroll into view will happen since to find the index of the item the component must enumerate the entire collection which far from desired especially when virtualized. In the past versions we had such problems that are fixed in the latest updates. You ca try this code in our demos for reference:
@inherits DbContextPage
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="0.5rem" class="rz-p-sm-12">
<RadzenLabel Text="Select Value" Component="DropDownBindValue" />
<RadzenDropDown @bind-Value=@value Data=@companyNames Style="width: 100%; max-width: 400px;" Name="DropDownBindValue" />
</RadzenStack>
@code {
string value = "Bon app'";
IEnumerable<string> companyNames;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
companyNames = dbContext.Customers.Select(c => c.CompanyName).Distinct().ToList();
}
}
I change IQueryable by List, and It's working for me now.
Thanks!
But I need the same functionality to the component RadzenDropDownDataGrid! I
There is no such functionality for RadzenDropDownDataGrid - we are open to pull requests.
Ok.
I don't know how I will solve this problem. Because when I open the component I need it to be positioned on the binded element and highlighted.