GridFormulaCopyFlags problem

The following block of code, place in the "load" callback (or other initialization function), prevents inputting numbers in a grid
control and causes the error: "Object reference not set to an instance of an object.".
 

GridFormulaEngine engine = ((GridFormulaCellModel)grid.Model.CellModels["FormulaCell"]).Engine;

engine.FormulaCopyFlags |=

GridFormulaCopyFlags.ClipBoardText;

engine.FormulaCopyFlags |=

GridFormulaCopyFlags.ClipBoardFormula;

engine.FormulaCopyFlags |=

GridFormulaCopyFlags.InsDelRangeReferencesUpdated;

engine.FormulaCopyFlags |=

GridFormulaCopyFlags.ClipBoardReferencesAdjusted;

engine.FormulaCopyFlags |=

GridFormulaCopyFlags.NamedRangeReferencesUpdated;

 

It appears that the engine.FormulaCopyFlags are set to null. Does anyone have suggestions on what I am doing wrong?

I have included the project in the attached .rar file. The bug is in the file GridEditor.


5 Replies

AD Administrator Syncfusion Team June 4, 2012 12:51 AM UTC

Here is the .rar file.


Monte Carlo Estimator_c5ddc72b.rar


JP Jeya Preetha M Syncfusion Team June 7, 2012 06:26 AM UTC

Hi Jan,

Thank you for interest in Syncfusion Products.

To perform copy/paste operation in the grid control, we have sample in our dash board.

Please refer the sample in the following link:

{Installed path}\Syncfusion\EssentialStudio\10.2.0.56\Windows\Grid.Windows\Samples\2.0\MS Excel-Style Features\Grid Copy-Paste Demo

Please let me know if you have any concerns.

Regards,

Jeya Preetha M



AD Administrator Syncfusion Team June 8, 2012 12:37 PM UTC

Sorry, I obviously explained the problem poorly. The real problem is in adding a page to a tabcontrol containing grids on each page and having all the grids recognize the variables and user functions that are in use. I redid the example (see attached project). In the redone project, I tried to boil the problem down to the simplest form. If you run the example and the right-click on the tabcontrol and select "Add Page", the program throws an error saying that the new grid is not recognized. I think this is the real problem. (But I'm not an expert, so I may be wrong.) Any help will be appreciated.
 
v/r
Jan


Monte Carlo Estimator_37dcd82.rar


AD Administrator Syncfusion Team June 8, 2012 01:44 PM UTC

I am apparently still describing the problem badly. In the example I just posted, the problem that arises has to do with a cross-sheet reference. I guess I am seeing it all as one big problem and not boiling it down correctly. I hope I didn't confuse things too much.
 
my appologies
 


RB Ragamathulla B Syncfusion Team June 18, 2012 05:31 AM UTC

Hi Jan,

I am afraid that I was not able to reproduce the issue. Also I have created a simple sample to test this issue and it is available in the following link.

http://www.syncfusion.com/downloads/Support/DirectTrac/95027/CS-203758908.zip

Please have a look at the preceding sample and if still the issue exists, could you please try reproducing it in the above sample so that we could sort out the cause of the issue and provide you a solution?

Regards,
Ragamathullah B.


Loader.
Up arrow icon