Binding to a flat data source

4 posts, 1 answers
  1. Mike
    Mike avatar
    13 posts
    Member since:
    Jun 2011

    Posted 06 Jun 2011 Link to this post

    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>

  2. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 09 Jun 2011 Link to this post

    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
  3. DevCraft banner
  4. Mike
    Mike avatar
    13 posts
    Member since:
    Jun 2011

    Posted 09 Jun 2011 Link to this post

    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!!
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 Jun 2011 Link to this post

    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
Back to Top