Completed
Last Updated: 11 Oct 2018 14:04 by Dimitar
ADMIN
Hristo
Created on: 11 Oct 2018 10:49
Category: PivotGrid
Type: Bug Report
0
FIX. RadPivotGrid - NullReferenceException when setting the data source of the control to null
How to reproduce: 
Me.RadPivotGrid1.DataSource = Nothing

Workaround: 
DirectCast(Me.RadPivotGrid1.DataProvider, LocalDataSourceProvider).ItemsSource = Nothing
Dim viewModel = Me.RadPivotGrid1.PivotGridElement.GetType().GetField("viewModel", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me.RadPivotGrid1.PivotGridElement)
viewModel.GetType().GetProperty("DataProvider").SetValue(viewModel, Nothing)
0 comments