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

Rad Chart Filter Descriptor throws "Argument types do not match"

2 Answers 78 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Novella
Top achievements
Rank 1
Novella asked on 28 Jul 2011, 03:36 PM
I seem to be missing something very basic here.  Both the property I'm filtering on and the passed parameter are Int32s

<telerik:SeriesMapping LegendLabel="Current Month">
    <telerik:SeriesMapping.FilterDescriptors>
    <telerik:FilterDescriptor Member="Month" Operator="IsEqualTo" Value="{Binding SelectedMonth}" />
    </telerik:SeriesMapping.FilterDescriptors>
    <telerik:SeriesMapping.GroupingSettings>
    <telerik:GroupingSettings ShouldFlattenSeries="True">
    <telerik:ChartGroupDescriptor Member="Metric"/>
    </telerik:GroupingSettings>
    </telerik:SeriesMapping.GroupingSettings>
    <telerik:ItemMapping AggregateFunction="Sum" FieldName="Count"/>
    <telerik:ItemMapping DataPointMember="XCategory" FieldName="Metric"/>
    </telerik:SeriesMapping>

However when this runs I get an error that the argument types don't match.  This works fine without the filter...

2 Answers, 1 is accepted

Sort by
0
Novella
Top achievements
Rank 1
answered on 29 Jul 2011, 07:51 PM
Thanks for all the help guys... I tried to go a different way with this, doing the filtering myself in the view model, and I found an interesting bug.

If you have multiple data series with their own items source, and you change one of them, it rebinds them all, this is sort of, unless enumerating the items source has side effects, however you don't check for nulls when you rebind all of the items sources, so you get an exception. I'm on Q1 I don't know if this is fixed in Q2, I haven't had a chance to upgrade, because I'm trying to get this release done asap.
0
Nikolay
Telerik team
answered on 02 Aug 2011, 10:43 AM
Hi Novella,

You are correct that currently there is an issue when binding the value of a FilterDescriptor. Our developers are aware of this issue and a fix will be provided with one of the future versions of the control. Meanwhile, as a work-around setting the Value without binding should work as expected.

As for the issue with using multiple data sources and updating one of them, we haven't been able to reproduce the exception you've mentioned in our local tests. I'm attaching a sample application( using Q1 SP1 assemblies ), which demonstrates such a scenario and works on our side. Please, have a look at it to verify if it works for you as well, as perhaps we are missing some of the details of your scenario. In case the problem persists, it would be very helpful for us if you're able to modify the application, so that the exception is reproducible.

All the best,
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
Tags
Chart
Asked by
Novella
Top achievements
Rank 1
Answers by
Novella
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or