Home Forums WinForms controls Xceed Grid for WinForms Grid Null Reference Exception – Red X Scrollbars

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • amlane86
    Post count: 1
    #43702 |

    I have a WinForm application that used Xceed.Grid. When the grid loads, I get the following exception and the scrollbar is a large red X.

    Object reference not set to an instance of an object.
    Stack InnerTrace:
       at Xceed.UI.Adaptive.AdaptiveTheme.PaintHorizontalScrollBar(Graphics graphics, Rectangle rectangle, ScrollBarUIState uiState, Color foreColor, Color backColor, Double opacity, Rectangle leftButtonRectangle, Rectangle leftShaftRectangle, Rectangle thumbRectangle, Rectangle rightShaftRectangle, Rectangle rightButtonRectangle)
       at Xceed.Grid.Controls.WinHorizontalScrollBar.OnPaint(PaintEventArgs e)
       at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
       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)

    I can’t reproduce this on my local machine in a test environment. Only the client is experiencing the issue. They are running the application on Windows 7 if that helps.

    Can someone help me figure out what’s happening? Thank you!

    Fawzi [Xceed]
    Post count: 722


    The only way to reproduce the issue, at our side, was to make the user temp folder not writable (temp folder is normally something like C:\Users\%UserName%\AppData\Local\Temp\ ). In that folder, we try to create a folder “Xceed.UI.WindowsXP” and also a sub folder that contains a version number, and in that folder we are creating a temp resource file to help with some style drawing.

    That said, can you ensure your application has enough rights in the Temp folder?

    Please note that We will also fix our code to fallback to a theme that will not need those temp resource file.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.