Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Mouse Scroll Internal Exception
posted

I have a reproducible exception that is thrown by an UltraGrid when the mouse scroll is used on a cell that does not support mouse scroll (like a regular text field).

I am able to reproduce this problem by peforming the following steps:

1. Ensure that the Grid AfterCellUpdate event has a call to DataBind().

2.  Select a value in a "DropdownList" grid cell that has a value list.

3.  Go to a different normal text cell and use the mouse scroll wheel (mine happens to have an input mask on it).

4.  Object ref error is thrown.

I have seen other problems with grids before when a DataBind() is called within certain events.  I assume that a ton of things are put into motion when a DataBind() is called....

   The stack trace is like so:

Exception=System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.EditorWithCombo.ProcessOnMouseWheel(MouseEventArgs e) at Infragistics.Win.EditorWithCombo.OnOwningControlMouseWheel(Object sender, MouseEventArgs e) at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e) at System.Windows.Forms.Control.OnMouseWheel(MouseEventArgs e) at Infragistics.Win.UltraWinGrid.UltraGridBase.OnMouseWheel(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseWheel(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Parents
  • 37774
    posted

    Are you calling DataBind() on the grid itself?  You should not need to do this as the grid implicitly binds itself to the DataSource when set.  If you want to force the grid to reload the data, you could call "this.ultraGrid1.Rows.Refresh(RefreshRow.ReloadData);".  Is there something else that you need that is leading you to call DataBind()?

    -Matt 

Reply Children
No Data