Last Updated: 03 Jun 2019 14:41 by ADMIN
Release 2019.2.603.360 (R2 2019 minor release)
Created on: 03 May 2019 11:37
Category: ListView
Type: Bug Report
ListView: [Android] Items are not loaded after second LoadOnDemandItemTemplate is tapped.

this is list view with loadondemand active

<telerikDataControls:RadListView Grid.Row="1"
      ItemsSource="{Binding PreviewEvents, Mode=TwoWay}"
                            <Grid WidthRequest="{Binding LoadMoreWidth}" HeightRequest="40" BackgroundColor="Gray"
                                  IsVisible="{Binding IsLoadMoreVisible,Mode=TwoWay}">
                                <Label HorizontalOptions="CenterAndExpand" 
                                   Text="{i18n:Translate CALENDAR_LOAD_MORE_EVENTS}"
                                   HorizontalTextAlignment="Center"  FontSize="Small" VerticalTextAlignment="Center"/>

private async void RecentEvents_LoadOnDemand(object sender, EventArgs e)
            var vm = (HomePageViewModel)ViewModel;
            await vm.GetRecentEvents(true);

Issue is :  After first time "Load More" button get disabled. (Doesnt seem to click) . Soon after loading it works.  Once it is clicked it loads the new items as well. After that the "Load More" but is not clickable. Atleast click doesnt seem to trigger the RecentEvents_LoadOnDemand event.

Any issues which could be the reason for this? 

Thank you in advance

1 comment
Posted on: 07 May 2019 11:25
Hi Roshan,

Thank you for the provided code.

I have tested the described scenario and I reproduced the issue with the LoadOnDemandItemTemplate on Android. It seems that the LoadOnDemandItemTemplate is not working properly on Android when LoadOnDemandMode is set to Manual.

I have converted this Forum thread into a public Bug Report Feedback Item. Please find your Telerik points updated as a small sing of gratitude for your involvement. 


You could use the following approaches as a workaround:

- use the default LoadOnDemandItemTemplate

- use the RadListView FooterTemplate. Inside it add a Button and on its Clicked event execute the RecentEvents_LoadOnDemand. For example:

<dataControls:RadListView x:Name="listView"
                  ItemsSource="{Binding Source}">
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        <Label Text="{Binding Title}" Grid.Row="0" FontSize="Large" TextColor="Black"></Label>
                        <Label Text="{Binding Author}" Grid.Row="1" FontSize="Medium" TextColor="Blue"></Label>
                <Button Text="Load On Demand" Clicked="RecentEvents_LoadOnDemand" />

For more details please check the attached sample.

I hope I was helpful.

Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Attached Files: