This is a migrated thread and some comments may be shown as answers.

Error at DpiScaleChanged()

1 Answer 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
RSousa
Top achievements
Rank 1
RSousa asked on 31 Jul 2017, 12:16 PM

Hi,

 

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

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 31 Jul 2017, 12:40 PM
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.

Regards,
Dimitar
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.
Tags
GridView
Asked by
RSousa
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or