开发者

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 t开发者_Go百科he 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>


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜