RadListView Pull To Refresh not work on iOS

0 Answers 101 Views
ListView - Xamarin.iOS
Hakob
Top achievements
Rank 1
Hakob asked on 07 Apr 2023, 06:11 AM | edited on 07 Apr 2023, 10:16 AM

Hi, I have an issue with RadListView Pull To Refresh, it doesn't work for iOS after using MyControl. MyControl opens RadPopup.

Down below-written sommelier code, please help to fix the issue.

<Grid VerticalOptions="FillAndExpand" HorizontalOptions ="FillAndExpand" RowSpacing="0" BackgroundColor="Red">
      <Grid.RowDefinitions>
        <RowDefinition Height="{x:Static resource:UiConst.ViewSize45}"/>
        <RowDefinition Height="{x:Static resource:UiConst.ViewSize1}"/>
        <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
      <StackLayout Grid.Row="0" Margin="10, 3, 0, 0" >
              //do something 
      </StackLayout>

      <BoxView Grid.Row="1"  />

 
        <datacontrols:RadListView     x:Name="listview"   BackgroundColor="Azure" Margin="0, 0, 0, 1"
                                    Grid.Row="2" HorizontalOptions = "FillAndExpand" VerticalOptions = "StartAndExpand"
                                    IsItemSwipeEnabled="True" 
                                    ItemSwipeCompleted="OnItemSwipeCompleted"
                                    ItemSwipeStarting ="Listview_ItemSwipeStarting"
                                    ItemsSource="Item"
                                    SelectionMode="None" 
                                    ItemTapped="ItemTapped"
                                    SwipeOffset="75,0,0,0" SwipeThreshold="10" 
                                    RefreshRequested="RadListView_RefreshRequested" 
                                    IsPullToRefreshEnabled="True" IsPullToRefreshActive="false">
          <datacontrols:RadListView.ItemTemplate>
            <DataTemplate>
              <listview:ListViewTemplateCell>
                <listview:ListViewTemplateCell.View>
                  <Grid HorizontalOptions="FillAndExpand" VerticalOptions="Center" Margin="0, 0, 0, -5">
                    <Grid.BackgroundColor>
                      <Binding Path="ReadTimeStamp" Mode="TwoWay">
                        <Binding.Converter>
                          <conv:NullToObjectConverter x:TypeArguments="Color"
                                               NullObject="blue"
                                               NotNullObject="white"/>
                        </Binding.Converter>
                      </Binding>
                    </Grid.BackgroundColor>

                    <Grid.RowDefinitions>
                      <RowDefinition Height="70"/>
                      <RowDefinition Height="1"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="80"/>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="80"/>
                    </Grid.ColumnDefinitions>

                    <Frame Grid.Column="0" Grid.Row="0" Margin="10, 5, 10, 0" >

                                <StackLayout>

                        <svg:SvgCachedImage />

                        <Label Text="text"/>
                      </StackLayout>
                    </Frame>

                   
                    <StackLayout Grid.Column="1" Grid.Row="0" Margin="5, 10, 5,  0" >
                      <Label Text=""/>

                      <Label Text=""/>
                    </StackLayout> 

                    <StackLayout Grid.Column="2" Grid.Row="0" Margin="0, 10, 5, 0"  >
                      <Grid   >
                        <Frame >
                                 <svg:SvgCachedImage /> 
                        </Frame>

                        <controls:MyControl"/>
                      </Grid>
                     
                      <Label Text=""/> 
                    </StackLayout>

                    <BoxView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"/>
                  </Grid>
                </listview:ListViewTemplateCell.View>
              </listview:ListViewTemplateCell>
            </DataTemplate>
          </datacontrols:RadListView.ItemTemplate>
          <datacontrols:RadListView.ItemSwipeContentTemplate>
            <DataTemplate>
              <Grid Margin="0"
                  Padding="0"
                  ColumnSpacing="0"
                  RowSpacing="0" 
                  BackgroundColor="">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="75"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackLayout >
                  <svg:SvgCachedImage 
                     WidthRequest="30" HeightRequest="30"
                     Source="{Binding SwipeIconSource}"/>
                  <Label   Text="">
                </StackLayout>
              </Grid>
            </DataTemplate>
          </datacontrols:RadListView.ItemSwipeContentTemplate>
        </datacontrols:RadListView>
      </Grid>
    </Grid>

                                   
Didi
Telerik team
commented on 07 Apr 2023, 10:55 AM

Hi Hacob, 

Thank you foir the provided code.

Could you please share whether the ListView is inside RadPopup. I am asking this based on your comment: MyControl opens RadPopup. or on ItemTapped you open a popup. 

Please send me the complete page's definition, view model, sample model and the logic that opens the popup. If you cant isolate the behavior in a sample that could be of great help. 

I am asking about this as on my side the PullToRefresh works on iOS. We have a sample example here: https://github.com/telerik/xamarin-forms-sdk/tree/master/XamarinSDK/SDKBrowser/SDKBrowser/Examples/ListViewControl/GesturesCategory/PullToRefreshExample 

No answers yet. Maybe you can help?

Tags
ListView - Xamarin.iOS
Asked by
Hakob
Top achievements
Rank 1
Share this question
or