Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Expander > RadExpander - HeaderTemplate Issue

Not answered RadExpander - HeaderTemplate Issue

Feed from this thread
  • Stefan Buys avatar

    Posted on Aug 23, 2011 (permalink)

    Hi

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

    See below:

    <telerik:RadExpander>
        <telerik:RadExpander.HeaderTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.5*"/>
                        <ColumnDefinition Width="0.5*" />
                    </Grid.ColumnDefinitions>
                    <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" />
                </Grid>
            </DataTemplate>
        </telerik:RadExpander.HeaderTemplate>
    ...
    </telerik:RadExpander>

    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.

    Stefan

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Aug 26, 2011 (permalink)

    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.

    Regards,
    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Expander > RadExpander - HeaderTemplate Issue
Related resources for "RadExpander - HeaderTemplate Issue"

Silverlight Expander Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]