RadExpander - HeaderTemplate Issue

2 posts, 0 answers
  1. Stefan Buys
    Stefan Buys avatar
    22 posts
    Member since:
    Dec 2009

    Posted 23 Aug 2011 Link to this post


    I have a RadExpander (2011 Q2) with a custom HeaderTemplate.

    See below:

                        <ColumnDefinition Width="0.5*"/>
                        <ColumnDefinition Width="0.5*" />
                    <dataInput:Label Content="{Binding Path=QueryDetails, Mode=TwoWay}" Grid.Column="0" FontWeight="Bold" Margin="0,0,10,0" Height="Auto" />
                    <dataInput:Label Content="Queries" Grid.Column="1" FontWeight="Bold" HorizontalAlignment="Right"  Margin="0,0,10,0" Height="Auto" />

    I am binding the first label to a String in my ViewModel, but the UI never seems to display the value via the binding. I have tried binding the property to a label somewhere else on the page (outside the template) and it works fine.

    Any advise will be welcome.

  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 26 Aug 2011 Link to this post

    Hello Stefan,

    The HeaderTemplate of the RadExpander will be only applied if the Header property is bound to a data object. Only then the control will look for a HeaderTemplate to set the visual representation of the business object bound to the header.

    From the code snippet you sent I don't see if the RadExpander.Header property is databound. If it's not binding it should fix the issue. If, however, this is not the case, then please send us a sample project illustrating your scenario so that we can further investigate the issue. Thank you in advance.

    Tina Stancheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft R3 2016 release webinar banner
Back to Top