Filtering DataFormComboBoxField

4 posts, 0 answers
  1. Harald
    Harald avatar
    54 posts
    Member since:
    Oct 2013

    Posted 17 Sep 2015 Link to this post

    I am using a DataSource and a DataForm with a DataTemplate in WPF. In principle it works.
    <telerik:RadEntityFrameworkDataSource Name="AcademicTitleDataSource" QueryName="CatalogEntries">
        <local:MyEntities x:Name="AcademicTitleContext" />
    <telerik:DataFormComboBoxField x:Name="AcademicTitleComboBox" Grid.Column="0" Grid.Row="7" Label="Titel:"                             
                                    ItemsSource="{Binding DataView, ElementName=AcademicTitleDataSource}"
                                    DataMemberBinding="{Binding AcademicTitle}"
                                    DisplayMemberPath="EntryName" />
    Now i want to display only certain items from the CatalogEntries wherw the CatalogID = 5. How can i filtering the Data?
  2. Harald
    Harald avatar
    54 posts
    Member since:
    Oct 2013

    Posted 20 Sep 2015 Link to this post

    How can I address a field in a RadDataForm per code (C#) if this has been defined using a template in WPF?

     Code like "this.DataFormName.DataFormFieldName." does not work.

  3. Stefan
    Stefan avatar
    796 posts

    Posted 21 Sep 2015 Link to this post

    Hi Harald,

    For this scenario, I suggest you applying IValueConverter to the ItemsSource binding of DataFormComboBoxField and filter the source collection in its Convert() method.

    Does this approach fit your requirements?

    Best Regards,
    Stefan X1
    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 Feedback Portal and vote to affect the priority of the items
  4. Harald
    Harald avatar
    54 posts
    Member since:
    Oct 2013

    Posted 03 Oct 2015 in reply to Stefan Link to this post

    Now i created the datasources in the C#-file and bound this datasources to the WPF-Controls. In C# i generate a query for the ComboBox. It works. Thank you.
Back to Top