Jon Skeet [C# MVP] wrote:
>I am struck with the same probelm
could you please suggest any solution if you found any
As Marc said, tell us what you're doing.
If possible, post a short but complete program demonstrating the
problem:
http://pobox.com/~skeet/csharp/complete.html
Jon
Hi jon,
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. CreateScrollabl eRegion(Rectang le scroll)
at System.Windows. Forms.DataGrid. set_HorizontalO ffset(Int32 value)
at System.Windows. Forms.DataGrid. ScrollRight(Int 32 columns)\
at System.Windows. Forms.DataGrid. ScrollToColumn( Int32 targetCol)
at System.Windows. Forms.DataGrid. EnsureVisible(I nt32 row, Int32 col)
at System.Windows. Forms.DataGrid. set_CurrentCell (DataGridCell value)
at System.Windows. Forms.DataGrid. OnMouseDown(Mou seEventArgs e)
at System.Windows. Forms.Control.W mMouseDown(Mess age& m, MouseButtons button,
Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
at
System.Windows. Forms.Component Manager.System. Windows.Forms.
UnsafeNativeMet hods+IMsoCompon entManager.FPus hMessageLoop(In t32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.RunDialog(Fo rm form)
at System.Windows. Forms.Form.Show Dialog(IWin32Wi ndow owner)
at System.Windows. Forms.Form.Show Dialog()