LookupPropertyDefinition with data template

1 posts, 0 answers
  1. Craig
    Craig avatar
    113 posts
    Member since:
    Nov 2011

    Posted 23 Oct 2012 Link to this post

    I have successfully displayed a single property using a LookupPropertyDefinition. The drop down is positioned to the value corresponding the the PropertyGrid value as expected and the other available values are visible when the dropdown arrow is pressed. Here's an example of the XAML:

    <telerik:LookupPropertyDefinition x:Name="ccLookupDef"
      DisplayName="Lookup Code" Binding="{Binding MyPropCode}"
      SelectedValuePath="Code" ItemsSource="{Binding Data.MyCodes,  Source={StaticResource proxy}}"

    I'd would like to apply a data template to the content of the dropdown so I can display formatted content from multiple lookup properties.
    I've tried using the EditorTemplate but it fixes the lookup data and no dropdown button is displayed.

    Here's the code:

    <telerik:LookupPropertyDefinition x:Name="ccLookupDef"
      DisplayName="Lookup Code"
      SelectedValuePath="Code" ItemsSource="{Binding Data.ChargeCodes,  Source={StaticResource proxy}}">
          <Grid Margin="0 3">
              <ColumnDefinition />
              <ColumnDefinition />
              <RowDefinition />
            <TextBlock Grid.Row="0" Text="{Binding MyPropCode}" />
            <TextBlock Grid.Row="0" Grid.Column="1" Margin="26,0,0,0" Text="{Binding Description}" />

    Is it possible to use a data template with LookupPropertyDefinition?
    What have I done wrong here?

Back to Top