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.
Unfortunately, activation email could not send to your email. Please try again.

GridFormulaEngine.LibraryFunction information

Thread ID:

Created:

Updated:

Platform:

Replies:

67513 Aug 21,2007 04:59 AM Aug 21,2007 09:35 AM Windows Forms 1
loading
Tags: GridControl
steve_randomno
Asked On August 21, 2007 04:59 AM

I want to implement some function help (like excels function menu).

Spec is along the following lines:
-Simple form containing two list boxes.
-Left hand listbox contains a list of available grid functions.
-Right hand list box shows the required and optional arguments for the selected function in the left hand listbox

I can get a list of function names easily as follows:

SortedDictionary functionList = new SortedDictionary();

private void PopulateFormulaeList()
{
functionList.Clear();
foreach (DictionaryEntry de in formulaCellModel.Engine.LibraryFunctions)
{
functionList.Add(de.Key as string , de.Value as GridFormulaEngine.LibraryFunction);
}
}
To get the argument names I then look at the objects of type System.Reflection.ParameterInfo in unction.Method.GetParameters(). However the only information I can get from the ParameterInfo Name and type properties is the .net parameter information (i.e. that there is a single string argument called args, argList or range in most cases).

Is it possible to get information about the individual argument that the user sees when writing the formulae types and if they are options for each argument in a GridFormulaEngine.LibraryFunction.

Many thanks,
Steve

Jeba S [Syncfusion]
Replied On August 21, 2007 09:35 AM

Hi Steve,

Thank you for your details.

Currenlty there is no way to get information about the individual argument. In any formula that references the name, the string would be substituted before parsing and computing takes place.

Please refer this sample which list the formulas with arguments in dropdown list.
http://websamples.syncfusion.com/samples/Grid.Windows/34349_1/main.htm

In the sample, custom cell is created with a static field of type datatable. In the form load this table is filled with the syntaxes of the library functions from the FormulaEngine. This datatable is used to fill the dropdown listbox with the matched function syntax.

Kindly let us know if you need any further assistance.

Best Regards,
Jeba.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;