I'm testing customer filter row example for Silverlight Q2 2009 and Silvelight 3. I've used the file GridViewFilterRow.cs directly from the telerik example, but I'm not able to compile my small app because of a - "The property 'IsEnabled' does not exist on the type 'RadGridView' in the XML namespace" - error message.
When I'm inserting the GetIsEnabled method shown below in the file GridViewFilterRow.cs, then the error didn't occur and everything works fine.
public static bool GetIsEnabled(DependencyObject dependencyObject)
{
return (bool)dependencyObject.GetValue(IsEnabledProperty);
}
Just for my understanding it would be great if someone could explain me, why this method is neccessary in my app but the Telerik example can live without it. Or do I have overlooked sth.
Thanks
Uwe
5 Answers, 1 is accepted
Indeed you are right. We've fixed our own example as well. The problem came after migration from SL2 to SL3 however for some reason works properly in our demos.
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Hello Vlad,
thanks for your reply. So I take it as it is and don't think about the reason any longer.
But now I've got problems to get this customer filter functionality running in my real app.
I've tried to copy this GridViewFilterRow functionality from my test to my real app and I'm faced with the problem that the column.DataType within the InitializeFilters method is always null. This causes a NullReferenceException later at the code line
return type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Nullable<>));
In my test app where I've checked the functionlity I've used a simple list and everything works fine. In my real app I'm using the DomainDataSource with the RadGridView and having done the whole definition of the grid in XAML.
To solve my problem, I've also checked the example CustomFilterRowAsync which is mentioned in your blog, but the problem is still the same. I've also tried to specify the DataType Attribute for the GridViewDataColumn element, but I can't find an example how to do this in XAML and ended up with a parsing error. Isn't it possible to specify the DataType in XAML?
Would you be so kind as to help me get this customer filter functionality running in my real app.
Thanks
Uwe
Unfortunately you are right! Setting types in XAML is not possible with Silverlight 3 and hopefully we will get better support for this in SL4. You can set desired column DataType programmatically - if the column is auto-generated you can use AutoGeneratingColumn event to access the column.
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
thanks for the info. After some necessary modifications like setting UniqueNames etc. I'm one step further.
A problem I still have is that after the data are shown a reset on the header seems to occur.
I'm using the
GridViewFilterRow.IsEnabled = "True" property within the grid definition in Xaml and in addition I'm setting the HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" within the definition of the single columns.
At first when the grid is empty everything seems to be ok. The text boxes are shown in the header and the font is adjusted like it's defined in the style definition.
But as soon as the data are loaded and shown a reset of the header occurs and my filter text boxes and my style are gone and the header is shown like it's shown by default. Even the filter functionality is the standard functionality.
Can you please help me to find the reason for this reset. Do I have to follow a certain workflow? At the moment everything is done in XAML except the type definition of the grid columns which is done in the Loaded event of the page.
Thanks
Uwe
Please send us small example demonstrating your case via support ticket. I will review your project and I'll get back with more info.
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
