Does the OnDemandAutomatic's ItemLoadingTemplate work?

2 posts, 0 answers
  1. Mikael
    Mikael avatar
    10 posts
    Member since:
    Jun 2012

    Posted 18 Nov 2012 Link to this post

    I have a DataBoundListBox set into the OnDemandAutomatic virtualization mode. It works great. But if I add the ItemLoadingTemplate as shown here to the control, it breaks: The control doesn't display anything, instead it raises the DataRequested-event all the time. As soon as I remove the ItemLoadingTemplate, everything reverts back to normal.

    I downloaded the samples and checked the OnDemand.xaml. What I noticed is that the ItemLoadingTemplate is there but it has been commented out. Actually the whole OnDemand-sample has been commented out from the Examples.xml.

    Any tips?
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 19 Nov 2012 Link to this post

    Hi Mikael,

    Thanks for contacting us and for reporting this issue.

    Can you please confirm that you see a commented out DataTemplate in the ItemLoadingTemplate section of the OnDemand example. We have simply put a BusyIndicator there and commented out the old animation. The commented code should be removed and we are going to update it:

    <telerikPrimitives:RadDataBoundListBox.ItemLoadingTemplate>
        <DataTemplate>
            <!--<Grid MinHeight="14">
             <Grid.Triggers>
                    <EventTrigger>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="ellipseTranslate" RepeatBehavior="Forever" AutoReverse="True" Duration="0:0:0.5" Storyboard.TargetProperty="X"  From="0" To="450">
                                    <DoubleAnimation.EasingFunction>
                                        <SineEase EasingMode="EaseInOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Grid.Triggers>
                <Ellipse VerticalAlignment="Center" HorizontalAlignment="Left" Width="6" Height="6" Grid.Column="1" Fill="{StaticResource PhoneAccentBrush}">
                    <Ellipse.RenderTransform>
                        <TranslateTransform x:Name="ellipseTranslate" X="0"/>
                    </Ellipse.RenderTransform>
                </Ellipse>
            </Grid>-->
            <telerikPrimitives:RadBusyIndicator AnimationStyle="AnimationStyle9" IsRunning="True" Content=""/>
        </DataTemplate>
    </telerikPrimitives:RadDataBoundListBox.ItemLoadingTemplate>

    As for the DataRequested event, it fires when new data has to be loaded. The loading template is shown as soon as items are loaded and the user has scrolled down to load more items.

    I hope this helps.

    Greetings,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top