Mike Cole
Mike Cole

Reputation: 14743

Binding a Telerik RadPanelBar to a flat data source in Silverlight

I'm attempting to bind a RadPanelBar to a flat data source in Silverlight. All the examples I am seeing using hierarchical data.

I want to show a simple log of events, with the ability to drop down and see a single text field with event details. I can recreate what I want manually like so:

<Controls:RadPanelBarItem>
    <Controls:RadPanelBarItem.Header>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="160"/>
                <ColumnDefinition Width="350"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <sdk:Label Content="Created Date" HorizontalAlignment="Left" />
            <sdk:Label Content="Subject" Margin="0" Grid.Column="1" HorizontalAlignment="Left"/>
            <sdk:Label Content="Contacted By" Margin="0" Grid.Column="2" HorizontalAlignment="Left"/>
        </Grid>
    </Controls:RadPanelBarItem.Header>
    <TextBlock Margin="0" TextWrapping="Wrap" Text="Notes Notes Notes Notes"/>
</Controls:RadPanelBarItem>

Upvotes: 1

Views: 714

Answers (1)

Mike Cole
Mike Cole

Reputation: 14743

The solution was to dummy up a hierarchical data structure that had just one child record for each item.

Upvotes: 1

Related Questions