Error at DpiScaleChanged()

2 posts, 0 answers
  1. RSousa
    RSousa avatar
    11 posts
    Member since:
    Oct 2016

    Posted 31 Jul 2017 Link to this post



    I'm using a RadGridView with ViewDefinitions and I'm getting an error when the Windows have the size of the text at 125%.

    The error happen only at this line: Grid.ViewDefinition = MyViewInfo.ViewDefinition


    Where my MyViewInfo is a local class:

        Private Class MyViewDefinitionInfo
            Public Columns As List(Of String)
            Public ViewDefinition As IGridViewDefinition
            Public RowHeight As Integer = 30
            Public HeaderHeight As Integer = 30
        End Class

    All the Column and Grid format is done inside of a Class, so I pass the Grid and DataTable as parameter

    During my tests, I came to conclusion that this error only happens when the Grid is on RadForm, so on a normal Windows Form the error doesn't happen.



    Part of the error is bellow, the full details is attached.

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.WinControls.UI.GridTableElement.DpiScaleChanged(SizeF scaleFactor)
       at Telerik.WinControls.RadElement.SetParent(RadElement parent)
       at Telerik.WinControls.RadElement.ChangeCollection(RadElement child, ItemsChangeOperation changeOperation)
       at Telerik.WinControls.RadElementCollection.OnInsertComplete(Int32 index, Object value)


    Full error attached

  2. Dimitar
    Dimitar avatar
    2831 posts

    Posted 31 Jul 2017 Link to this post

    Hi Rodolfo,

    This is a known issue which is already resolved in the latest version of the suite. Detailed information along with a workaround is available here: UI for Winforms Feedback Portal - FIX. RadGridView - exception when the grid is not visible and the DPI scaling is larger than 100%

    I hope this will be useful. Let me know if you have additional questions.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top