We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

problem with setting up multiple grid application

I am building an app with numerous GridControls. Each is initialized with:

GridFormulaEngine engine = ((GridFormulaCellModel)gridName.Model.CellModels["FormulaCell"]).Engine;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardText;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardFormula;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.InsDelRangeReferencesUpdated;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardReferencesAdjusted;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.NamedRangeReferencesUpdated;

Everything works fine with cut/paste and calculation/formula support working as long as I am operating within each grid separately. However, as soon as I add the lines:

int sheetFamilyID = GridFormulaEngine.CreateSheetFamilyID();
GridFormulaEngine.RegisterGridAsSheet("grid1", grid1.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("grid2", grid2.Model, sheetFamilyID);

The program crashes with the following message:

"Object reference not set to an instance of an object."

in the line:

engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardText;

for one of the grids.

Has anyone run into this problem and know how I can fix it?



2 Replies

AD Administrator Syncfusion Team November 10, 2011 03:21 PM UTC

I stripped the app down to a single grid and no functionality. I started testing at each step of development. Occurence of the "object reference not set to an instance of an object" error begins as soon as I change the value of the CellType parameter for the Standard Cells in the BaseStylesMap from "TextBox" to "FormulaCell". Is this a bug in Syncfusion's libraries? For those using new versions, I am using version 8.2.0.18 of the libraries.




AS Asarudheen S Syncfusion Team November 11, 2011 11:58 AM UTC

Hi Jan,

Thank you for your interest in Syncfusion products.

I am afraid that I was not able to reproduce the issue. Could you please share us simple sample to demonstrate the issue so that we could sort out the cause of the issue and provide you a solution?

Appreciate any additional information.

Regards,
Asarudheen.



Loader.
Live Chat Icon For mobile
Up arrow icon