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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

improper formula

Thread ID:

Created:

Updated:

Platform:

Replies:

71718 Feb 11,2008 11:07 AM UTC Feb 13,2008 05:51 AM UTC WinForms 1
loading
Tags: GridControl
harisan
Asked On February 11, 2008 11:07 AM UTC

Hello,

I got 'improper formula' with these codes. Pls advise what's wrong?

Dim evaluator As ExpressionFieldEvaluator = ggBusiness.TableDescriptor.ExpressionFieldEvaluator
evaluator.AddFunction("Price", New ExpressionFieldEvaluator.LibraryFunction(AddressOf GetPrice))

Dim AmountEfd As ExpressionFieldDescriptor = New ExpressionFieldDescriptor("Amount", "Price(10)", "System.String") '"[Qty]*[Price]", "System.Double")

ggc.gettabledescriptor("OrderDetail").expressionfields.add(AmountEfd)


Private Function GetPrice(ByVal Qty As String) As String
Dim arg1 As Double
Double.TryParse(Qty, System.Globalization.NumberStyles.Any, Nothing, arg1)
Return (arg1 * 100).ToString
end function

Thanks,
Harry



Jeba S [Syncfusion]
Replied On February 13, 2008 05:51 AM UTC

Hi Harry,

Thank you for your details.

I have created a VB sample with Custom Expression based on the code snippets provided by you. The sample is available in the below link:
http://websamples.syncfusion.com/samples/Grid.Windows/F71718/main.htm

If you still face any issue in this sample, please provide some more details to reproduce the issue. Or modify the above sample just to show the issue, that we will help us to analyze the issue and provide you a solution.

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.

Warning Icon 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.Close Icon

;