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

[Solved] InvalidCastException during filter operation

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 21 Nov 2009, 10:29 AM
Hi all

I have just added a filter to a grid (a list of wines with name, vintage etc).

When I attempt to filter on Vintage I get an InvalidCastException which seems to be
 caused by a Null value for Vintage in one of the records in the database.

How can I allow this filter to work even when there are some null values for
that column?

Thanks for your help!

Clive





1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Nov 2009, 09:01 AM
Hello Clive,

Try setting the EnableLinqExpressions property of the grid to false and see if it helps. Here's the link to a forum discussion which explains on a similar issue. You should take a look at it.
Filtering IsNull on DateTimeColumn

Hope this helps..
Princy.
Tags
Grid
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or