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
close icon

Formatting a Formula cell

How can I format the result of the below with two decimal places for example “12.00” With GridControl1(12, 2) .HorizontalAlignment = GridHorizontalAlignment.Right .CellType = "FormulaCell" .Text = “=AVG(B1*C1/100+B2*C2/100+B3*C3/100+B4*C4/100+B5*C5/100)” .FloatCell = False .Enabled = False .Clickable = False End With

3 Replies

AD Administrator Syncfusion Team February 4, 2004 02:04 PM UTC

you can set the style''s Format property. .Format = "#.00" or .Format = "F2" I am not sure AVG is doing anything for you in your formula.

JT JT February 4, 2004 04:16 PM UTC

That works just as advertised, thank you! The formula does work for me, but I do have another question. Is there some printed material that discusses all the property settings? The user manual does not come close to covering all the property settings for the GridControl?

AD Administrator Syncfusion Team February 4, 2004 04:24 PM UTC

It is not printed, but you can check the Syncfusion Class reference from within Visual Studio or from the Syncfusion Developer center (found on the Start Menu) under the Syncfusion folder. If you find a method or property in the class reference, a good source of usage information would be to search the Samples folder to see if one of our samples makes use of the property or method.

Live Chat Icon For mobile
Up arrow icon