开发者

Binding a Telerik RadPanelBar to a flat data source in Silverlight

开发者 https://www.devze.com 2023-03-11 16:09 出处:网络
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'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

精彩评论

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

关注公众号