Unplanned
Last Updated: 21 Jan 2025 05:51 by ADMIN
Franz
Created on: 17 Dec 2024 13:05
Category: UI for .NET MAUI
Type: Bug Report
0
CollectionView: [Android] [iOS] Items do not display in a custom scenario when trying to load items during navigation

The ItemsSource of the views is populated in the ViewModel of the page. This is done in a command that is triggered by the NavigatedTo event of the page, which is forwarded via EventToCommandBehavior from the Maui Toolkit.

When using the RadCollectionView the loaded items are no longer displayed. 

When the ObservableCollection of the items is completely reconstructed and reassigned the display works.

1 comment
ADMIN
Didi
Posted on: 21 Jan 2025 05:51

The behavior also happens in the following scenario:

Clear the bounded collection before you populate the items. Below is the code to reproduce it. Call page load from OnAppearing() of code behind file.

public async Task OnPageLoad()
{
	await LoadItems();
}

public async Task LoadItems()
{
	Items.Clear();
	// Add code to populate Items.
}

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.