Binding to the ListFooterTemplate

6 posts, 0 answers
  1. Jon
    Jon avatar
    2 posts
    Member since:
    May 2011

    Posted 09 Jun 2011 Link to this post

    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>
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 09 Jun 2011 Link to this post

    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>>
  3. DevCraft banner
  4. Stefano
    Stefano avatar
    9 posts
    Member since:
    Jul 2012

    Posted 09 Jun 2011 Link to this post

    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 .
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 09 Jun 2011 Link to this post

    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>>
  6. Stefano
    Stefano avatar
    9 posts
    Member since:
    Jul 2012

    Posted 09 Jun 2011 Link to this post

    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
  7. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 10 Jun 2011 Link to this post

    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>>
Back to Top
DevCraft banner