This question is locked. New answers and comments are not allowed.
When testing the datagrid control I ran into some unhandled exceptions crashing my app.
My current reproduction of the issue is slightly extreme but it easily throws the exception.
(project reproducing this issue can be downloaded here: https://dl.dropboxusercontent.com/u/2679266/DataGrid.zip )
=> setup:
datagrid with several templatedcolumns
cellcontenttemplate: textbox
=> enough columns to enable scrolling (or alternatively make window small enough to enable scrolling)
=> when scrolling a bit forward and going back the exception is thrown (also when scrolling forward very fast)
Stacktrace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.UI.Xaml.Controls.Grid.RadDataGrid.MeasureCell(GridCellModel cell)
at Telerik.UI.Xaml.Controls.Grid.RadDataGrid.Telerik.Core.IElementPresenter.MeasureContent(Object owner, Object content)
at Telerik.UI.Xaml.Controls.Grid.Model.GridModel.Telerik.UI.Xaml.Controls.Grid.ITable.Measure(Node node)
at Telerik.UI.Xaml.Controls.Grid.CellsController`1.MeasureCellDecorator(T cellDecorator)
at Telerik.UI.X
When I linked the actual sourcecode in my project this happenedin the MeasureCell(GridCellModel cell) method in the RadDataGrid.Model.cs class.
=> cell.Column is null in this case => nullreference exception
Initially this was tested on the 2014 v3 controls (so the stacktrace might be a bit off on the latest version) but I just tested this with the 2015 dll's as well and the crash happens there too.
In my actual app I wouldn't need everything to be a textbox at the same time. I tried to minimize this in a different project (by using a usercontrol that toggled between templates) and even though the exceptions stayed away longer, they still sometimes occurred.
I do actually need the flexibility of datatemplates so using numeric/text columns is not an option for me.
Could someone have a look at this issue and see if there's a fix possible?
Thank you,
Michiel
My current reproduction of the issue is slightly extreme but it easily throws the exception.
(project reproducing this issue can be downloaded here: https://dl.dropboxusercontent.com/u/2679266/DataGrid.zip )
=> setup:
datagrid with several templatedcolumns
cellcontenttemplate: textbox
=> enough columns to enable scrolling (or alternatively make window small enough to enable scrolling)
=> when scrolling a bit forward and going back the exception is thrown (also when scrolling forward very fast)
Stacktrace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.UI.Xaml.Controls.Grid.RadDataGrid.MeasureCell(GridCellModel cell)
at Telerik.UI.Xaml.Controls.Grid.RadDataGrid.Telerik.Core.IElementPresenter.MeasureContent(Object owner, Object content)
at Telerik.UI.Xaml.Controls.Grid.Model.GridModel.Telerik.UI.Xaml.Controls.Grid.ITable.Measure(Node node)
at Telerik.UI.Xaml.Controls.Grid.CellsController`1.MeasureCellDecorator(T cellDecorator)
at Telerik.UI.X
When I linked the actual sourcecode in my project this happenedin the MeasureCell(GridCellModel cell) method in the RadDataGrid.Model.cs class.
=> cell.Column is null in this case => nullreference exception
Initially this was tested on the 2014 v3 controls (so the stacktrace might be a bit off on the latest version) but I just tested this with the 2015 dll's as well and the crash happens there too.
In my actual app I wouldn't need everything to be a textbox at the same time. I tried to minimize this in a different project (by using a usercontrol that toggled between templates) and even though the exceptions stayed away longer, they still sometimes occurred.
I do actually need the flexibility of datatemplates so using numeric/text columns is not an option for me.
Could someone have a look at this issue and see if there's a fix possible?
Thank you,
Michiel