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.
Unfortunately, activation email could not send to your email. Please try again.

Mouse Wheel causes error in Dropdown list

Thread ID:

Created:

Updated:

Platform:

Replies:

103316 Apr 20,2012 04:23 PM Apr 26,2012 12:42 AM Silverlight 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 20, 2012 04:23 PM

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)



Administrator [Syncfusion]
Replied On April 23, 2012 10:27 AM

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.


Rajasekar [Syncfusion]
Replied On April 26, 2012 12:42 AM

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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;