This project is read-only.

Exception in OnPaint

Mar 19, 2009 at 6:45 PM
Hi all,

I am using SourceGrid I am having a weird error which causes grid to have a huge red cross on it.
There is no way to get rid of it except restarting the application.
Here is the exception I am receiving. Since it occurs in OnPaint event, I can't
Does anybody have this problem before?

<style> <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:Calibri; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:"Times New Roman"; mso-fareast-language:EN-US;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style>

Index was outside the bounds of the array.

   at SourceGrid.Grid.get_Item(Int32 row, Int32 col)

   at SourceGrid.Grid.GetCell(Int32 p_iRow, Int32 p_iCol)

   at SourceGrid.GridVirtual.PanelPaint(GridSubPanel p_Panel, GraphicsCache graphics)

   at SourceGrid.GridVirtual.OnScrollablePanelPaint(GraphicsCache graphics)

   at SourceGrid.GridSubPanelBase.OnPaint(PaintEventArgs e)

   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)

   at System.Windows.Forms.Control.WmPaint(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   at System.Windows.Forms.ContainerControl.WndProc(Message& m)

   at System.Windows.Forms.UserControl.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)

Mar 20, 2009 at 7:03 AM
Could you please update to trunk and try reproducing this error? If the error persists, provide the necessary steps to reproduce this problem.