Automatic data loading on top

10 posts, 0 answers
  1. Marco
    Marco avatar
    7 posts
    Member since:
    Apr 2014

    Posted 04 Apr 2014 Link to this post

    Hi,

    I'm developing a chat page in my app and I use RadDataboundListBox to show messages.
    I want to load old messages when user go on the top of the list. Is it possibile? By default this behavior is only for "scroll on bottom event", I would have DataRequested raised when user go on top, instead of Pull to refresh.

    A last question, can DataBound Listbox sroll on bottom when a new messag is added?

    Thank you,
    Marco
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 09 Apr 2014 Link to this post

    Hi Marco,

    This feature is only available when scrolling towards the bottom of the list.

    The top of the list is managed by the Pull to Refresh behaviour.

    We will log your request in our TODO list and will eventually implement it since it's been requested previously.

    Regards,
    Deyan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Marco
    Marco avatar
    7 posts
    Member since:
    Apr 2014

    Posted 09 Apr 2014 in reply to Deyan Link to this post

    Hi Deyan,

    thank you for reply.

    Is it possible to change the default content of "pull to refresh"? I would try to mask the pull to refresh look to simulate a "load on demand" behavior
  5. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 11 Apr 2014 Link to this post

    Hello Marco,

    Thanks for writing back.

    Yes, there is a way to do this but I would not recommend. The Pull-to-Refresh is actually a "load-on-demand" behavior. If you hide the text and put something else that does not remind the end-users that they need to pull the list to get new data - they might get confused.

    Regards,
    Deyan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Marco
    Marco avatar
    7 posts
    Member since:
    Apr 2014

    Posted 14 Apr 2014 in reply to Deyan Link to this post

    Yes, of course. I want only replace "pull to refresh" whit "pull to load older". How I can do this?

    Thank you!
    Marco
  7. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 17 Apr 2014 Link to this post

    Hello Marco,

    This can be done via the a Localization Manager.

    Take a look at the following help topics for more information:

    http://www.telerik.com/help/windows-phone/localization-overview.html

    http://www.telerik.com/help/windows-phone/localization-string-loaders.html

    http://www.telerik.com/help/windows-phone/localizationstrings-listbox.html

    What you will need to do is basically define a custom string loader and return your string for the corresponding PullToRefresh message key.

    I hope this is helpful.

    Regards,
    Deyan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Marco
    Marco avatar
    7 posts
    Member since:
    Apr 2014

    Posted 29 Apr 2014 Link to this post

    Thank you for solution, I'll try it!



    I've founded a strange issue in a RadDataBoundListBox that I used in my project: it hasn't "scroll grip". 
    When I scroll the list and I hold my finger on the screen the list don't "break" but continue to scroll. The only way to stop scrolling is to scroll in the other direction. Why? The others RadDataBoundListBox in the project hasn't this issue, but I don't understand why.

    <telerikControls:RadDataBoundListBox x:Name="YYY"
                                                             ItemsSource="{Binding Path=XXX}" 
                                                             IsPullToRefreshEnabled="False" 
                                                             PullToRefreshIndicatorStyle="{StaticResource PullToRefreshIndicatorStyle}"
                                                             UseOptimizedManipulationRouting = "False"
                                                             EmptyContent=""
                                                             ItemTap="ItemTap"
                                                             telerikCore:InteractionEffectManager.IsInteractionEnabled="True" 
                                                             IsAsyncBalanceEnabled="True"
                                                             ItemAnimationMode="PlayAll"
                                                             ItemTemplateSelector="{StaticResource XTemplateSelector}"
                                                             DataVirtualizationMode="OnDemandAutomatic">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="DataRequested">
                                    <i:InvokeCommandAction Command="{Binding Path=JJJ}" CommandParameter="{Binding Path=ZZZ}" /> 
                                </i:EventTrigger>
                            </i:Interaction.Triggers>

                            <telerikControls:RadDataBoundListBox.ItemAddedAnimation>
                                <telerikCore:RadFadeAnimation Duration="0:0:0.3" StartOpacity="0" EndOpacity="1">
                                    <telerikCore:RadFadeAnimation.Easing>
                                        <CubicEase EasingMode="EaseIn" />
                                    </telerikCore:RadFadeAnimation.Easing>
                                </telerikCore:RadFadeAnimation>
                            </telerikControls:RadDataBoundListBox.ItemAddedAnimation>

                            <telerikControls:RadDataBoundListBox.ItemRemovedAnimation>
                                <telerikCore:RadFadeAnimation Duration="0:0:0.3"  StartOpacity="1" EndOpacity="0">
                                    <telerikCore:RadFadeAnimation.Easing>
                                        <ExponentialEase EasingMode="EaseOut" />
                                    </telerikCore:RadFadeAnimation.Easing>
                                </telerikCore:RadFadeAnimation>
                            </telerikControls:RadDataBoundListBox.ItemRemovedAnimation>

                        </telerikControls:RadDataBoundListBox>

    In the item templates I use Interaction.Trigger to trigger the tap event of an Image in the ItemTemplate. I user also the standard Windows Phone ContextMenu


  9. Marco
    Marco avatar
    7 posts
    Member since:
    Apr 2014

    Posted 29 Apr 2014 Link to this post

    Thank you for solution, I'll try it!



    I've founded a strange issue in a RadDataBoundListBox that I used in my project: it hasn't "scroll grip". 
    When I scroll the list and I hold my finger on the screen the list don't "break" but continue to scroll. The only way to stop scrolling is to scroll in the other direction. Why? The others RadDataBoundListBox in the project hasn't this issue, but I don't understand why.

    <telerikControls:RadDataBoundListBox x:Name="YYY"
                                                             ItemsSource="{Binding Path=XXX}" 
                                                             IsPullToRefreshEnabled="False" 
                                                             PullToRefreshIndicatorStyle="{StaticResource PullToRefreshIndicatorStyle}"
                                                             UseOptimizedManipulationRouting = "False"
                                                             EmptyContent=""
                                                             ItemTap="ItemTap"
                                                             telerikCore:InteractionEffectManager.IsInteractionEnabled="True" 
                                                             IsAsyncBalanceEnabled="True"
                                                             ItemAnimationMode="PlayAll"
                                                             ItemTemplateSelector="{StaticResource XTemplateSelector}"
                                                             DataVirtualizationMode="OnDemandAutomatic">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="DataRequested">
                                    <i:InvokeCommandAction Command="{Binding Path=JJJ}" CommandParameter="{Binding Path=ZZZ}" /> 
                                </i:EventTrigger>
                            </i:Interaction.Triggers>

                            <telerikControls:RadDataBoundListBox.ItemAddedAnimation>
                                <telerikCore:RadFadeAnimation Duration="0:0:0.3" StartOpacity="0" EndOpacity="1">
                                    <telerikCore:RadFadeAnimation.Easing>
                                        <CubicEase EasingMode="EaseIn" />
                                    </telerikCore:RadFadeAnimation.Easing>
                                </telerikCore:RadFadeAnimation>
                            </telerikControls:RadDataBoundListBox.ItemAddedAnimation>

                            <telerikControls:RadDataBoundListBox.ItemRemovedAnimation>
                                <telerikCore:RadFadeAnimation Duration="0:0:0.3"  StartOpacity="1" EndOpacity="0">
                                    <telerikCore:RadFadeAnimation.Easing>
                                        <ExponentialEase EasingMode="EaseOut" />
                                    </telerikCore:RadFadeAnimation.Easing>
                                </telerikCore:RadFadeAnimation>
                            </telerikControls:RadDataBoundListBox.ItemRemovedAnimation>

                        </telerikControls:RadDataBoundListBox>

    In the item templates I use Interaction.Trigger to trigger the tap event of an Image in the ItemTemplate. I user also the standard Windows Phone ContextMenu
  10. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 02 May 2014 Link to this post

    Hi,

    Thank you for your feedback. We will further investigate this issue and we will get back to you with more information.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  11. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 08 May 2014 Link to this post

    Hello Marco,

    We have tried to reproduce the issue on our side but without success.

    Would it be possible for you to prepare a sample project that reproduces the scenario and send it to us for further investigation?

    You will have to open a new support ticket to be able to do that.

    Regards,
    Deyan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner