When the datagrid has multi rows and the vertical scrollbar hasn't appeared,
if I click the column near the bound or drag horizontal scrollbar, this
exception will be throwed. The trace stack as follows:
at System.Windows.Forms.DataGrid.CreateScrollableRegi on(Rectangle scroll)
at System.Windows.Forms.DataGrid.set_HorizontalOffset (Int32 value)
at System.Windows.Forms.DataGrid.ScrollRight(Int32 columns)\
at System.Windows.Forms.DataGrid.ScrollToColumn(Int32 targetCol)
at System.Windows.Forms.DataGrid.EnsureVisible(Int32 row, Int32 col)
at System.Windows.Forms.DataGrid.set_CurrentCell(Data GridCell value)
at System.Windows.Forms.DataGrid.OnMouseDown(MouseEve ntArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button,
Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMethods+IMsoComponentManager. FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
..
..
..
My datasource is a datatable.
IDE: .net 2003 + framework 1.1 + sp1
Does anyone know whether this is the DataGrid own bug?
What can I do to workaground it or resolve it?
Thanks.