我把“有点甜”的代码引用到自编的程序里,效果很好,但代码t = e.Form.Controls("Table1").Table 中的表Table1 如果是页面集合中的第1页 ,运行时就会出错,出错信息如下,请“有点甜”指导一下,是不是我哪里引用不当了?
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at C1.Win.C1FlexGrid.ColumnCollection.get_Item(Int32 index)
at Foxtable.ColCollection.get_Item(Int32 int_0)
at UserCode.MouseEnterCell(Object sender, RowColEventArgs e)
at C1.Win.C1FlexGrid.RowColEventHandler.Invoke(Object sender, RowColEventArgs e)
at C1.Win.C1FlexGrid.C1FlexGridBase.OnMouseEnterCell(RowColEventArgs e)
at C1.Win.C1FlexGrid.C1FlexGridBase.?
(Point value)
at ??
.??
.?
(MouseEventArgs e)
at C1.Win.C1FlexGrid.C1FlexGridBase.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.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)