This is a migrated thread and some comments may be shown as answers.

Issues with grouped listview and loadondemand

1 Answer 300 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 28 Oct 2020, 03:36 PM

Hi,

I have most recently added the LoadOnDemand support for my RadListViews in my Xamarin project. For the android part everything works nicely and as expected, but the iOS site really shows some strange behavior.

So only on iOS, when the list is initially displayed, almost all groups are still expandable/collapsable, but only the very last group is not. The "Load more" info is not shown at all even if it should be displayed. When I select the group header of the last group the "Load more" info is displayed. But in this case the default LoadingOnDemandItemTemplate and LoadOnDemandItemTemplate is used, not my one.

Since the list is in a child navigation page I can go back to the parent and navigate again to the child page. After selecting the last group header my LoadingOnDemandItemTemplate  and LoadOnDemandItemTemplate are used.

And to make it even more complicated, when the last group of the list comes into the viewable area the PullToRefresh does not work anymore. Even after scrolling back to the beginning of the list the PullToRefresh is still disabled.

 

My RadListView definition:

<telerikDataControls:RadListView x:Name="errorListViewPortrait"
                        Grid.Row="0" Grid.Column="0" Margin="0"
                        FilterDescriptors="{Binding ErrorFilter, Mode=OneWayToSource}"
                        GroupDescriptors="{Binding ErrorGrouping, Mode=OneWayToSource}"
                        ItemsSource="{Binding Errors, Mode=TwoWay}"
                        IsPullToRefreshEnabled="True" SelectionMode="None" IsPullToRefreshActive="{Binding IsLoading}"
                        ItemTemplate="{StaticResource touroperatorActivityErrorsTemplate}"
                        HeaderTemplate="{StaticResource errorDataListHeaderTemplate}"
                        GroupHeaderTemplate="{StaticResource dataListGroupHeaderTemplate}"                        
                        LoadOnDemandItemTemplate="{StaticResource dataListLoadOnDemandMoreTemplate}"
                        LoadingOnDemandItemTemplate="{StaticResource dataListLoadOnDemandLoadingTemplate}"
                        IsLoadOnDemandEnabled="{Binding HasMoreData, Mode=OneWay}" IsLoadOnDemandActive="{Binding OnDemandLoading, Mode=OneWay}" LoadOnDemandMode="Manual">
                <telerikDataControls:RadListView.LayoutDefinition>
                  <telerikListView:ListViewLinearLayout VerticalItemSpacing="2" GroupHeaderLength="{x:OnPlatform iOS=30, Android=-1, UWP=-1}"/>
                </telerikDataControls:RadListView.LayoutDefinition>
                <telerikDataControls:RadListView.Commands>
                    <telerikListViewCommands:ListViewUserCommand Id="PullToRefreshRequested" Command="{Binding RefreshErrors}"/>
                    <telerikListViewCommands:ListViewUserCommand Id="LoadOnDemand" Command="{Binding LoadItemsOnDemand}" />
                </telerikDataControls:RadListView.Commands>
            </telerikDataControls:RadListView>

 

Since it is hard to describe the strange behavior by words I could sent some images of the app if needed.

I am using the most recent Telerik nuget package 2020.3.1022.1 and xamarin.forms 4.8.0.1560

 

Any help would be appreciated.

 

Regards,

Michael

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 29 Oct 2020, 10:41 AM

Hello Michael,

That's  weird behavior and we haven't come across it so far.  I'd like to ask you, if it's possible, to try to isolate it in a sample application and send it over, so we can research the reasons behind.  Or at least send us the page containing the ListView as well as the used ViewModel, so I can try to replicate the erroneous behavior on my side. Please open a support ticket and send us the files as a zip archive there.

Thank you for your cooperation on this.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ListView
Asked by
Michael
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or