Unplanned
Last Updated: 15 May 2017 10:38 by ADMIN
ADMIN
Martin Ivanov
Created on: 22 Mar 2017 14:36
Category: Spreadsheet
Type: Bug Report
2
SpreadProcessing: NullReferenceException thrown when the VisibleSize property is set more than once
NullReferenceException is thrown when the VisibleSize property of RadSpreadsheet is set more than once on two (or more) adjacent lines. For example:

spreadsheet.VisibleSize = new SizeI(1, 1);
spreadsheet.VisibleSize = new SizeI(5, 5);

To work this around you can increase the time between the settings of the VisibleSize property. For example you can use the ActiveSheetEditorChanged event of RadSpreadsheet and the ActivePresenterChanged event of the ActiveWorksheetEditor, and the UIUpdated event of the ActivePresenter. Each time the VisibleSize is changed, the ActiveWorksheetEditor will be recreated along with its ActivePresenter. You should make sure the second, third, etc. setting of the VisibleSize is executed after the new ActivePresenter is loaded. This can be done in the UIUpdated event.
0 comments