Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1425
Can Infragistics Functions be Overloaded?
posted

Hi All,

Does anyone know if functions used in the CalcManager can be overloaded with variations of the functions with more parameters?

e.g. Overloading the 'sum' function to take the number of items in the collection to aggregate - resulting in one 'sum' function that simply takes a collection of values (the original 'sum' function) and a new 'sum' function that takes the collection of values and an additional numerical argument.

Or would we have to name the functions differently?

Cheers,

Richard

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Richard,

    You can add your own customer functions or replace the existing functions in the CalcManager by creating your own function library.

    Functions in UltraCalcManager don't really have overloads, but you could replace an existing function with a new one that has optional parameters. But this would mean replacing (and essentially re-writing the whole function).

    To learn more about creating your own function library, there's a sample in the NetAdvantage samples called "UserDefinedLibrary".

Children