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

Error when DataSource has nullable fields

1 Answer 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 1
Roland asked on 06 Apr 2010, 01:56 PM
Hello,

I have a radDataGrid and the source is a List<customerClass>, where curstomer class have nullable fields ( DateTime? and int? ).
When i want to set the filter in the filterRow on such a column I get the following exception.

How can I make the filter working on such columns?

Regards
Roland



System.InvalidCastException wurde nicht behandelt.

Message=

"Ungltige Umwandlung von \"System.DateTime\" in \"System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]\"."

 

Source=

"mscorlib"

 

StackTrace:

bei System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)

bei System.DateTime.System.IConvertible.ToType(Type type, IFormatProvider provider)

bei System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)

bei Telerik.WinControls.UI.GridFilterCellElement.SetFilterValue(Object value)

bei Telerik.WinControls.UI.GridFilterCellElement.set_Value(Object value)

bei Telerik.WinControls.UI.RadGridView.UpdateFiltering()

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 09 Apr 2010, 02:01 PM
Hi Roland,

We have already sent you the answer in the support ticket , which you have created on the same issue. I am just posting it here again for the community:

We have reproduced the exception and this is going to be fixed for the shortly upcoming Q1 2010 Service Pack 1 release.

Kind regards,
Martin Vasilev
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
Roland
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or