Binding RadTreeListView to ModelItem

3 posts, 0 answers
  1. Arinto
    Arinto avatar
    25 posts
    Member since:
    Nov 2010

    Posted 24 Feb 2011 Link to this post

    Hi there, 

    We want to use RadTreeListView to bind into Workflow Foundation's ModelItem.
    The example shown in this sample code is using TreeView to display WF ModelItem. But in our requirement, we need additional columns to display information in the node. That's why we plan to use RadTreeListView. However, we haven't been able to bind it properly to ModelItem.

    So, do you have any idea how to bind ModelItem to RadTreeListView?
    Here is the simplified structure of ModelItem that we want to bind
    1. ModelItem has collection of ModelProperty
    2. The Value property of ModelProperty object is another ModelItem
    3. So, we want to bind to ModelItem (let's say MI), and then MI's children will be collection of ModelProperty.Value (which is also a type of ModelItem)

    Thanks and best regards, 

  2. Arinto
    Arinto avatar
    25 posts
    Member since:
    Nov 2010

    Posted 25 Feb 2011 Link to this post

    Hi there,

    Additional info on ModelItem class. ModelItem can be bound to WPF XAML using its dynamic binding.
    Refer to these two links for additional informations:
    1. Improving ModelItem with Dynamic
    2. Deep Dive into WF Designer Data Model: ModelItem and ModelProperty

    So we can use ModelItem properties directly in the XAML.
    Example. This example works well for Sequence Activity in Workflow framework
    <telerik:RadTreeListView Name="sequenceTreeListView"
                             ItemsSource="{Binding }"
            <telerik:GridViewDataColumn Header="Title"
                                        DataMemberBinding="{Binding Path=ItemType}"/>
            <telerik:TreeListViewTableDefinition ItemsSource="{Binding Path=Activities, Converter={StaticResource childrenConverter}}"/>

  3. Maya
    Maya avatar
    4062 posts

    Posted 01 Mar 2011 Link to this post

    Hi Arinto,

    I got a bit confused as it seems that you have already find the right approach for your scenario. May you clarify whether you need any assistance or you have got everything solved ? 

    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top