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

Does the OnDemandAutomatic's ItemLoadingTemplate work?

1 Answer 30 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mikael
Top achievements
Rank 1
Mikael asked on 18 Nov 2012, 07:40 AM
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?

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 19 Nov 2012, 08:18 AM
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.
Tags
DataBoundListBox
Asked by
Mikael
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or