We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Mouse Wheel causes error in Dropdown list

I have a drop down list in an Essential Grid (silverlight). Whe the user scrolls through the choices using the mouse wheel I am getting this exception:

(This does not happen if the users scrolls using the scroll bars on the driop down list)

Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Controls.Grid.GridComboBoxCellRenderer.comboBox_SelectionChanged(Object sender, SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.OnSelectionChanged(SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems)
at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(Int32 oldIndex, Int32 newIndex)
at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(Int32 oldIndex, Int32 newIndex)
at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
at System.Windows.DependencyObject.SetValue(DependencyProperty property, Int32 i)
at System.Windows.Controls.ComboBox.OnMouseWheel(MouseWheelEventArgs e)
at System.Windows.Controls.Control.OnMouseWheel(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)



2 Replies

AD Administrator Syncfusion Team April 23, 2012 02:27 PM UTC

I think I figured this one out. I updated my project from version 8 of teh grid to version 10. In version 8 I had to use two events to handle updates to cells. I used the CurrentCellAcceptedChanges and the CurrentCellChanged event. It was necessary to use the CurrentCellCHnaged event because changes in ComoboBox columns were not picked up in the CurrentCellAcceptedChanges event in version 8.

In version 10 having both events casued this issue with the Mouse Wheel. I removed the CurrentCellChanged handler and the problem went away. It seems that the CurrentCellAcceptedChanges event picks up changes in the Combox box now, so teh second event handler is no longer necessary.



RA Rajasekar Syncfusion Team April 26, 2012 04:42 AM UTC

HI William,

Thanks for your reply and please let me know if you face any difficulties.

Please let us know if you have any queries.

Thanks,
Rajasekar



Loader.
Live Chat Icon For mobile
Up arrow icon