First I'd like to thank you for your interest in RadSpreadsheet!
It is possible to create custom functions with RadSpreadsheet. Additionally you have great flexibility when handling different cases for the type and count of function arguments, as well as different options for parsing or raising errors on specific argument types.
In order to create a custom function you need to inherit from the FunctionBase class or any of its inheritors (NumbersInFunction, StringsInFunction, BooleansInFunction, etc.) depending on what best suits your needs. By inheriting such a class you need to override the Name and FunctionInfo properties and EvaluateOverride method which returns the result from function calculations.
Each function may have required arguments and optional arguments (the latter may allow repetitions).
You may additionally specify concrete argument conversion rules if the default one coming from the inherited class doesn't suit your needs entirely.
Finally, after you have implemented the new function class, you need to register it using FunctionManager's RegisterFunction method.
I am sending you a demo project where you can see the implementation of a GeoMean function class, calculating the Geometric mean of a sequence of numbers. You may see function registration in MainWindow constructor which looks like:
FunctionManager.RegisterFunction(new GeoMean());
I hope this information is helpful! If you have any other question on a concrete function implementation please do not hesitate to contact us again!
Regards,
Deyan
the Telerik team
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>