The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using a virtually bound GridControl with all the cells of type FormulaCell. It's the formulas that are the problem.
I would like to be able to replace my backing data store for the grid to a set of entirely different data at run time, numerous times over. This is to provide a 'drill-down' effect on a cell the user clicks on to get more information.
To put that another way, the user will click on a cell (or whatever), my program will make the backing data store point at a different array of data and then queryCellInfo and friends will point to the new data array. At a later time the user clicks something else and the original data set is restored and the cell info functions all know about that change.
This much works fine for just getting values to display in the grid. However, the model.Engine.DependentCells hashtable still contains a whole bunch of dependencies between the formulas in the old data store after the new data store has come into use. This causes all sorts of problems.
I've tried calling Clear on the hashtable and doing a complete refresh of the grid with no luck. Other attempts have failed also.
Is there a way to tell the engine to forget all of the formula dependencies, or do I have to create a new grid in this situation?
ADAdministrator Syncfusion Team April 27, 2007 04:22 PM UTC
There is a second collection in the grid that you need to clear. But in addition, you also need to clear your cache of GridFormulaTag objects. If you are using formulacells in a GridDataBoundGrid, then you need to be caching the FormulaTags in Model.SaveCellInfo and providing them back in Model.QueryCellInfo. Exactly, how you clear your formulatag cache would depend upon what you are using to hold them. In addition, as part of clearing your formulatag cache, you would also want to clear whatever formulas are in your grid.DataSource. If you do not, they will just reappear.