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

improper formula

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



1 Reply

JS Jeba S Syncfusion Team 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.


Loader.
Live Chat Icon For mobile
Up arrow icon