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

Filter error - Object cannot be cast from DBNull to other types

4 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 17 Apr 2012, 08:56 PM
Hello,

I'm trying to filter a RadGridView against a standard Dataset tableadapter with a SQL server DateTime field.

Some of the field values in the background table column are Null.

The datatable has the field properties set to "AllowDBNull" values, however the error I am receiving is "Invalid filter expression"

When viewing the detail exception I am seeing "Object cannot be cast from DBNull to other types".

The attached image shows the tableadapter field settings and the error dialogs.

Any ideas on how to work around this error without changing from a dataset.

Thanks in advance.

4 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 18 Apr 2012, 02:21 AM
One more point I just tested out was this was working in the Rad Version 2012.1.12.0215 (file setup: RadControls_WinForms_2012_1_12_0215_trial), but is not working now with the latest trial Version 2012.1.321.40.
0
Stefan
Telerik team
answered on 20 Apr 2012, 03:36 PM
Hi Steve,

Thank you for writing.

This is a know issue, which is already resolved in our latest internal build. You can download the internal build from Your Account.

I hope that you find this information useful. Let us know if you have any other questions.

All the best,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
John
Top achievements
Rank 1
answered on 16 Jun 2015, 08:54 PM

Hi,  I'm getting this same error when I filter on a Checkbox Column.  Any ideas.  I have version 2014.3.1202.40.

Thanks,

John

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Jun 2015, 11:20 AM
Hello John,

Thank you for writing.

It seems to be a known issue which is already fixed in Q3 2014 SP1 (2014.3.1202). Here is the feedback item for your reference. If you are still reproducing the problem with version 2014.3.1202, could you please provide a sample code snippet replicating the issue? Thus, we would be able to investigate the precise case and assist you further. Thank you in advance.

I am looking forward to your reply. 

Regards,
Dess
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Stefan
Telerik team
John
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or