This is a migrated thread and some comments may be shown as answers.

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

4 Answers 97 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Austin
Top achievements
Rank 1
Austin asked on 02 Nov 2011, 08:47 PM
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" />

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 03 Nov 2011, 10:23 AM
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 >>

0
Austin
Top achievements
Rank 1
answered on 03 Nov 2011, 09:16 PM
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?
0
Austin
Top achievements
Rank 1
answered on 03 Nov 2011, 09:16 PM
Sorry, it double posted. I received an error and hit reply twice as a result.
0
Austin
Top achievements
Rank 1
answered on 03 Nov 2011, 10:20 PM
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.
Tags
DataFilter
Asked by
Austin
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Austin
Top achievements
Rank 1
Share this question
or