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
1440
Red X in UltraWinGrid
posted

Every now and then and with no repeatable pattern, I get a red X displayed during the loading of a UltraWinGrid.  The code in using is below:

sqlCn.Open()

sqlReader = sqlCmd.ExecuteReader()

If sqlReader.HasRows Then

tabCoInfo.Load(sqlReader)

ugCompanies.DataSource = tabCoInfo

m_Firsttime_Flag = True

End If

sqlCn.Close()

 

Below is the content of the stack trace when this happened.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
   at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
   at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
   at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
   at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
   at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
   at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
   at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
   at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
   at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
   at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
   at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
   at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe)
   at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe)
   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.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)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4200 (NetFxQFE.050727-4200)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.HostingProcess.Utilities
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualStudio.HostingProcess.Utilities.Sync
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities.Sync/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll
----------------------------------------
Microsoft.VisualStudio.Debugger.Runtime
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.21022.8
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Debugger.Runtime/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Debugger.Runtime.dll
----------------------------------------
vshost
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Users/Clay/Documents/Visual%20Studio%202008/Projects/LoadContacts/bin/Debug/LoadContacts.vshost.exe
----------------------------------------
Infragistics2.Shared.v9.1
    Assembly Version: 9.1.20091.2077
    Win32 Version: 9.1.20091.2077
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Shared.v9.1/9.1.20091.2077__7dd5c3163f2cd0cb/Infragistics2.Shared.v9.1.dll
----------------------------------------
Infragistics2.Win.Misc.v9.1
    Assembly Version: 9.1.20091.2077
    Win32 Version: 9.1.20091.2077
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Win.Misc.v9.1/9.1.20091.2077__7dd5c3163f2cd0cb/Infragistics2.Win.Misc.v9.1.dll
----------------------------------------
Infragistics2.Win.UltraWinDataSource.v9.1
    Assembly Version: 9.1.20091.2077
    Win32 Version: 9.1.20091.2077
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Win.UltraWinDataSource.v9.1/9.1.20091.2077__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinDataSource.v9.1.dll
----------------------------------------
Infragistics2.Win.UltraWinGrid.v9.1
    Assembly Version: 9.1.20091.2077
    Win32 Version: 9.1.20091.2077
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Win.UltraWinGrid.v9.1/9.1.20091.2077__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinGrid.v9.1.dll
----------------------------------------
Infragistics2.Win.v9.1
    Assembly Version: 9.1.20091.2077
    Win32 Version: 9.1.20091.2077
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Infragistics2.Win.v9.1/9.1.20091.2077__7dd5c3163f2cd0cb/Infragistics2.Win.v9.1.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml.Linq
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Data.DataSetExtensions
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Data.DataSetExtensions/3.5.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
LoadContacts
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Clay/Documents/Visual%20Studio%202008/Projects/LoadContacts/bin/Debug/LoadContacts.EXE
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Microsoft.Office.Interop.Outlook
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.4518.1014
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.Outlook/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll
----------------------------------------
Interop.Redemption
    Assembly Version: 4.6.0.0
    Win32 Version: 4.6.0.0
    CodeBase: file:///C:/Users/Clay/Documents/Visual%20Studio%202008/Projects/LoadContacts/bin/Debug/Interop.Redemption.DLL
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Two questions:

1)  How do I prevent this from happening?

2)  If it does happen, how can I display something other than the red x?

 

 

 

Parents Reply Children
No Data