Pickers in a ListView firing ItemTemplateSelector

3 posts, 0 answers
  1. IanV
    IanV avatar
    39 posts
    Member since:
    Dec 2008

    Posted 17 Jun 2019 Link to this post

    We are using the RadListView and have added a Picker ontrol.

    When the user selects an item in the Picker, the RadListView's ItemTemplateSelector fires and reloads the cell, loosing the values.

    How can we stop the ItemTemplateSelector from firing when a picker is selected?

     

    <dataControls:RadListView
    x:Name="list"
    IsVisible="{Binding IsLoading, Converter={StaticResource NegateBooleanConverter}}"
    ItemsSource="{Binding Items}"
    BackgroundColor="White"
    IsPullToRefreshActive="{Binding IsBusy}"
    IsPullToRefreshEnabled="True"
                    SelectionMode="None">
     
    <dataControls:RadListView.ItemTemplateSelector>

  2. IanV
    IanV avatar
    39 posts
    Member since:
    Dec 2008

    Posted 17 Jun 2019 Link to this post

    To reproduce this, add this demo Picker to a RadListView which uses an Item selector. When you choose a monkey, the Selector re-fires clearing the selection

     

    <Picker x:Name="picker"Title="Select a monkey"TitleColor="Red"><Picker.ItemsSource><x:Array Type="{x:Type x:String}"><x:String>Baboon</x:String><x:String>Capuchin Monkey</x:String><x:String>Blue Monkey</x:String><x:String>Squirrel Monkey</x:String><x:String>Golden Lion Tamarin</x:String><x:String>Howler Monkey</x:String><x:String>Japanese Macaque</x:String></x:Array></Picker.ItemsSource></Picker>

  3. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1193 posts

    Posted 18 Jun 2019 Link to this post

    Hello Ian,

    Thank you for the details, I built a test with that Picker implemented in a DataTemplate used by the TemplateSelector.

    However, I was not able to replicate what you've reported on any of the platforms (Android, iOS or UWP). Please try the attached project and see this on your end. Disregard the project name's relevance, you'll find the RadListView and related classes on MainPage and MainPage.xaml.cs.

    Note that the project uses Telerik UI for Xamarin 2019.2.603 and Xf 3.6 (the latest supported options).


    Further Investigation

    In general, if a TemplateSelector is being invoked, then there was usually a property changed event, trigger or other update mechanism in play. If you could update my demo so that it replicates the issue and send it back to me, I can forward it to the development team for further investigation.

    Since you cannot open a support ticket to attach a ZIP file, you can instead host it on DropBox/OneDrive/etc and send me a download link instead.


    Relevancy Note:

    Before updating the demo, please try your implementation with a normal Xamarin.Forms ListView to eliminate if the problem is a Xamarin.Forms-specific issue or a Telerik RadListview-specific issue.

    Regards,
    Lance | Technical Support Engineer, Principal
    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
Back to Top