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

Binding to the ListFooterTemplate

5 Answers 72 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.
Jon
Top achievements
Rank 1
Jon asked on 09 Jun 2011, 05:50 AM
We are trying to bind to the ListFooterTemplate but it doesn't appear to be working, is this supported?

Essentially we need to dynamically display a LoadMore button in the footer depending on whether the number of items in the list may allow a new page (e.g. if pages are 10 items long and there is 34 items in the list then load more would be hidden, if it was 30, it would be shown).

 <telerikPrimitives:RadDataBoundListBox.ListFooterTemplate>
                    <DataTemplate>
                        <Grid>
                            <Button Content="load more" HorizontalAlignment="Stretch" 
                                    Visibility="{Binding IsPagingAllowed, Converter={StaticResource VisibilityTrueConverter}}">
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Click">
                                        <cm:ActionMessage MethodName="NextPageNews" />
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Button>
                        </Grid>
                    </DataTemplate>
                </telerikPrimitives:RadDataBoundListBox.ListFooterTemplate>

5 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 09 Jun 2011, 07:26 AM
Hi Jon,

Thanks for contacting us and for your question.

Based on the XAML code that you have pasted I cannot determine the cause for the issue that you experience. Therefore I would like to kindly ask you to prepare a sample project that we can use to reproduce the behavior and see what causes it. In this way we will be able to better assist you.

Please note that you will have to open a new support ticket in order to be able to attach your code.

I would also like to mention that the functionality that you would like to achieve is available out-of-the-box in the RadDataBoundListBox control. In other words, you can easily display a 'Get more...' button at the end of the list and hide it when all items have been downloaded. You will need to set the DataVirtualizationMode property to OnDemandManual and use the DataVirtualizationItemContent and DataVirtualizationItemTemplate properties to define the appearance of the specialized item.

For further information you can take a look at our online help here (source sample available):

http://www.telerik.com/help/windows-phone/raddataboundlistbox-features-datavirtualization-ondemandmanual.html

You can also take a look at the source code of our Telerik RadControls application (the demo app showcasing all Telerik controls also available on the WP7 Marketplace) where there is an example which demonstrates this functionality. 

I hope this helps.

Do not hesitate to get back to us in case you have further questions or need assistance.

Best wishes,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Stefano
Top achievements
Rank 1
answered on 09 Jun 2011, 11:11 AM
Hi,
I think i'm facing the same problem. I'm trying to define a ListFooterTemplate for the footer following the example found on the documentation but an error fires up saying "the member ListFooterTemplate is not recognized or is not accessible". Seems like there's no ListFooterTemplate nor ListHeaderTemplate properties on RadDataBoundListBox. I'm using RadControls version 2011.1.516.1037 .
0
Deyan
Telerik team
answered on 09 Jun 2011, 11:24 AM
Hello Stefano,

Please note that this functionality is available as of RadControls for Windows Phone 7 Q2 2011 Beta 1. The version you are using is earlier and does not include these properties.

You can download the beta version from our website by accessing the Downloads section of your account.

I hope this helps.

Regards,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Stefano
Top achievements
Rank 1
answered on 09 Jun 2011, 12:59 PM
Thanks a lot, that solves my problem. It wasn't clear from the documentation page that this is actually a feature present on the BETA release.
Stefano
0
Deyan
Telerik team
answered on 10 Jun 2011, 08:28 AM
Hi Stefano,

Thanks for writing back.

In general, our online help content aims to reflect everything that is available in the latest official release downloadable from our website.

Do not hesitate to get back to us in case you have further questions or need assistance.

Kind regards,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
DataBoundListBox
Asked by
Jon
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Stefano
Top achievements
Rank 1
Share this question
or