Hi,
I have a column that is connected to an enum, and another column that is connected to a list of objects.
when i try to select an object/enum member on the filter, the system crashes.
in the enum case with the following reason:
System.InvalidCastException was unhandled
Message="Invalid cast from 'System.String' to 'Sivan3.Dao.Poco.Student+StudentStatus'."
Source="mscorlib"
StackTrace:
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.String.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Telerik.WinControls.UI.GridFilterCellElement.SetFilterValue(Object value)
at Telerik.WinControls.UI.GridFilterCellElement.set_Value(Object value)
at Telerik.WinControls.UI.RadGridView.UpdateFiltering()
at Telerik.WinControls.UI.RadGridView.OnValueChanged(Object sender, EventArgs e)
at Telerik.WinControls.UI.RadGridView.CallValueChanged(Object sender, EventArgs e)
at Telerik.WinControls.UI.BaseGridEditor.OnValueChanged()
at Telerik.WinControls.UI.RadComboBoxEditor.comboBoxElement_TextChanged(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnTextChanged(EventArgs e)
at Telerik.WinControls.UI.EditorBaseElement.OnTextChanged(EventArgs e)
at Telerik.WinControls.RadItem.OnPropertyChanged(RadPropertyChangedEventArgs e)
at Telerik.WinControls.UI.PopupEditorBaseElement.OnPropertyChanged(RadPropertyChangedEventArgs e)
at Telerik.WinControls.UI.RadComboBoxElement.OnPropertyChanged(RadPropertyChangedEventArgs e)
at Telerik.WinControls.RadObject.RaisePropertyNotifications(RadPropertyValue propVal, Object oldValue, Object newValue, ValueSource oldSource)
at Telerik.WinControls.RadObject.SetValueCore(RadPropertyValue propVal, Object propModifier, Object newValue, ValueSource source)
at Telerik.WinControls.RadElement.SetValueCore(RadPropertyValue propVal, Object propModifier, Object newValue, ValueSource source)
at Telerik.WinControls.RadObject.SetValue(RadProperty property, Object value)
at Telerik.WinControls.RadItem.set_Text(String value)
at Telerik.WinControls.UI.RadComboBoxElement.set_Text(String value)
at Telerik.WinControls.UI.RadComboBoxElement.SyncTextWithItem()
at Telerik.WinControls.UI.ComboPopupForm.listBoxElement_SelectedIndexChanged(Object sender, EventArgs e)
at Telerik.WinControls.UI.RadListBoxElement.OnSelectedIndexChanged(SelectedIndexChangedEventArgs e)
at Telerik.WinControls.UI.RadListBoxElement.DispatchSelectionEvents(Boolean selectedIndex, Boolean selectedItem, Object oldValue)
at Telerik.WinControls.UI.RadListBoxElement.SetSelectedIndex(Int32 value, Boolean fireEvents)
at Telerik.WinControls.UI.RadListBoxElement.set_SelectedIndex(Int32 value)
at Telerik.WinControls.UI.RadListBoxElement.HandleSelectOne(Int32 newIndex)
at Telerik.WinControls.UI.RadListBoxElement.ProcessSelection(Int32 newIndex, Boolean onMouseDrag, InputDevice device)
at Telerik.WinControls.UI.RadListBoxElement.ProcessMouseSelection(RadItem item, MouseNotification reason)
at Telerik.WinControls.UI.RadListBoxItem.DispatchMouseNotification(MouseNotification notification)
at Telerik.WinControls.UI.RadListBoxItem.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args)
at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadElement.CallDoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m)
at Telerik.WinControls.UI.ComboPopupForm.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Sivan3.Program.Main() in D:\Sivan3\trunk\src\PC\Sivan3\Program.cs:line 32
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
on the databound columns, it throws an exception that an Object Must implement IConvertible.
Thanks,
Nadav Ben-Gal