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

FilterDescriptor

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Finn
Top achievements
Rank 1
Finn asked on 05 Jul 2010, 02:10 PM
Hi,
I'm trying to programmatically set a FilterDescriptor to default filter out a number of rows in a dataset/datatable based on 
a Boolean property/column that I retrieve from my database/viewmodel. The problem is that I keep getting conversion error:
'The binary operator Equal is not defined for the types 'System.Object' and 'System.Boolean.'.

 paramView.FilterDescriptors.Add(new FilterDescriptor("Show",FilterOperator.IsEqualTo,true));

I've confirmed that the datatype from the database is a System.Data.DbType.Boolean (shows up in the grid as a checkbox column by default). Am I wrong in assuming that there should be a way of expressing 'true' that meets the requirement of the FilterExpression-generator, or is there another recommended way of accomplishing this task? 


Best regards,

Finn
 

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 05 Jul 2010, 02:18 PM
Hello Finn,

Can you please open a separate support ticket and send us a small sample project that reproduces this behavior. Thanks in advance.

Sincerely yours,
Ross
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Finn
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or