This is a migrated thread and some comments may be shown as answers.

Binding to a flat data source

3 Answers 68 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 Jun 2011, 08:39 PM

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>

3 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 09 Jun 2011, 04:20 PM
Hello Mike,

I prepared similar solution that  uses databinding and Teleriks` HierarChicalDataTemplates. Please let us know if it satisfies you or not.

Greetings,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 09 Jun 2011, 07:45 PM
Excellent!  That worked perfectly.

Is there a way to either hide the drop down icon, or otherwise manipulate it?  I'd like the user to be able to tell if there are no items in the drop down.

Thanks!!
0
Petar Mladenov
Telerik team
answered on 14 Jun 2011, 05:45 PM
Hello Mike,

You can change the ControlTemplate of the RadPanelbarItem`s dynamically. In this forum thread you can find a control template that hides the down arrow. Let us know if you need further assistance on this.

Kind regards,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
PanelBar
Asked by
Mike
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Mike
Top achievements
Rank 1
Share this question
or