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
close icon

Add Calculate Functions Back

If I use CalcEngine.LibraryFunctions.Clear() to remove all library functions... how do I add back in say the Sum or Round functions? Its the func parm of the AddFunction I am having trouble with!

1 Reply

AD Administrator Syncfusion Team April 6, 2006 04:04 AM UTC

Hi Peter, If you are only using a selected few Library functions, you may want to remove the unused ones. This will reduce the memory usage and may speed up parsing as well. You can use the method CalcEngine.RemoveFunction to remove even a single function. To remove all functions, you can clear the hashtable that holds them by using engine.LibraryFunctions.Clear(). After clearing all functions, you can add back the few methods you often employ. To replace a function with another implementation you must remove the original name and add the same name back with a different delegate method. Please take a look at the \Program Files\Syncfusion\Essential Studio\4.1.0.x\windows\Calculate.Windows\Samples\DataGridCalculator sample. In particular, a new function named Mymin is added to the function library in the SingleDataGridForm.cs or SingleDataGridForm.vb file. Also please refer Documentaiton section: Essential Calculate/Base/Function Library Best Regards, Jeba

Loader.
Live Chat Icon For mobile
Up arrow icon