Cannot get [Display(AutoGenerateFilter = false)] to work

5 posts, 0 answers
  1. Austin
    Austin avatar
    10 posts
    Member since:
    Jan 2011

    Posted 02 Nov 2011 Link to this post

    I'm trying to use the simple example code here: http://www.telerik.com/help/wpf/raddatafilter-features-data-annotations.html

    I can't get any of the data annotations to work. Here is the code I'm using:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.ComponentModel.DataAnnotations;
     
    namespace namespace
    {
        public class dummy
        {
            [Display(AutoGenerateFilter = false)]
            public string Name
            {
                get;
                set;
            }
            [Display(ShortName = "Company's Name")]
            public string CompanyName
            {
                get;
                set;
            }
            public string Title
            {
                get;
                set;
            }
        }
    }

    The XAML is simply <telerik:RadDataFilter Name="DataFilter" />
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 03 Nov 2011 Link to this post

    Hi Austin,

    Can you please send us a very small dummy project that demonstrates the behavior that you are faced with. We will examine and debug it in order to see what exactly is going on.

    Thanks in advance.

    Regards,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Austin
    Austin avatar
    10 posts
    Member since:
    Jan 2011

    Posted 03 Nov 2011 Link to this post

    When I make a clean simple project it works as expected. What could be different about my main project that keeps this feature from working? Can you give me an idea of what I might be looking for - missing reference, wrong configuration, etc?
  5. Austin
    Austin avatar
    10 posts
    Member since:
    Jan 2011

    Posted 03 Nov 2011 Link to this post

    Sorry, it double posted. I received an error and hit reply twice as a result.
  6. Austin
    Austin avatar
    10 posts
    Member since:
    Jan 2011

    Posted 03 Nov 2011 Link to this post

    I eventually solved this issue by using the WPF 4.0 dll's as opposed to the 3.5 dll's. I would however like help with another issue I've stumbled into.

    I'd ideally like to cast the FilteredSource of the data filter to the same type as the original source, in this case an ObservableCollection. When I break I can see that my collection is there in the FilteredSource property, but I have no idea how to get at it.
Back to Top
UI for WPF is Visual Studio 2017 Ready