Posted 4 October 2024, 3:31 am EST - Updated 4 October 2024, 3:36 am EST
Hi
As advised on a previous forum post, I have been using a cursor data collection for my C1AutoComplete controls. I have also been using a cursor data collection my FlexGrids (I hope that is also correct for flexgrid? please advise.).
I am using C1EntityFrameworkCoreCursorDataCollection and it has been working well for both my Autocompletes and FlexGrids.
But it has been broken since version 8.0.20241.872, and is still broken in 8.0.20241.927.
It works in 8.0.20241.820 and previous versions.
The issue is if you scroll down a couple of pages of the autocomplete and select an item, it does not select properly.
- When you click an item after scrolling a couple of pages of items, it does not show it as selected in the box.
- If you click an item from the first page, it selects correctly.
If you monitor the SelectedItemChanged event, you can see that it fires twice:
- once with the item correctly,
- and then a second time with null.
I removed all the event handlers to see if something was causing it, but the issue is still there. I reverted to version 8.0.20241.820 and it works.
Relevent Code Snippets:
private C1EntityFrameworkCoreCursorDataCollection<Customer>? cursorDataCollectionCustomer;
private C1AutoComplete<Customer>? autoCompleteCustomer;
rfidDbContext = RfidDbContextFactory.CreateDbContext();
cursorDataCollectionCustomer = new C1EntityFrameworkCoreCursorDataCollection<Customer>(rfidDbContext.Customers.Where(c => c.Inactive == false).OrderBy(a => a.Name));
<C1AutoComplete ItemsSource="cursorDataCollectionCustomer" Placeholder="Search by Customer Number or Name" T="Customer"
DisplayMemberPath="Name" MinLength="3" ValueMemberPath="CustomerId" Filtering="HandleFiltering"
SelectedItemChanged="HandleSelectedItemChanged" IsDropDownOpenChanged="HandleDropDownOpenChanged"
Class="c1-drop-down form-control-mycustom" EditorStyle="@("padding: 0px;")"
@ref="autoCompleteCustomer">
<ItemTemplate Context="itContext">
<span>@itContext.CustomerNumber - @itContext.Name</span>
</ItemTemplate>
</C1AutoComplete>
I’ve placed a couple of screenshots below.