Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

This is driving me crazy

How do I format a numeric value as a percentage?

value 0.1 = 10%

 

I am using the QFDataGrid control columns collection.

 

In the bound field I see the property TextFormatString.

 

What do I put in there to make this work?

 

I also tried the Custom Format Column

Properties are Format Code and FormatMethod Name I've tried everything I can think of in these and nothing seems to work.

 

Documentation in help file is less than helpful.

 

"TextFormatString - gets or sets the text format string. Use this to add string formatting to bound data." Really?? How abouyt the magic incantation to make it work??

 

I've evn tried holding my tongue in different positions. Sheesh...

Please use plain text.
Employee
lorir-w
Posts: 69
Registered: 04-01-2009

Re: This is driving me crazy

Are you configuring an Editable Grid control with a Numeric column in 7.5.4? If so, would Format Type=Percent do what you need?


<script type="text/javascript" src="../../SkinSupport/MadCapMerging.js"></script> <script type="text/javascript" src="../../SkinSupport/MadCapAliasFile.js"></script> <script type="text/javascript" src="../../SkinSupport/MadCapUtilities.js"></script> <script type="text/javascript" src="../../SkinSupport/MadCapEffects.js"></script> <script type="text/javascript" src="../../SkinSupport/MadCapEffectsMenu.js"></script> <script type="text/javascript" src="../../SkinSupport/MadCapBody.js"></script> <script type="text/javascript" src="../../SkinSupport/MadCapHighlighter.js"></script>

Format Type

Description:

Used to convert a numeric value to a string.

 

To use this property:

Select a value from the drop-down list. Available options for the control are:

  • Number
  • Percent
  • Decimal
  • Scientific

Available options for the grid column are: 

  • Number
  • Percent

 

Default Value:

Number

Please use plain text.
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Re: This is driving me crazy

Nope, just a DataGrid.

It's what the new form wizard pumps out.

 

QFDataGridCol Collection Editor

to access properties.

 

 

Please use plain text.
Employee
lorir-w
Posts: 69
Registered: 04-01-2009

Re: This is driving me crazy

[ Edited ]

I'm told that TextFormatString should take the same syntax as the data bindings Format String.

 

  1. If the control property is a string, you can set its format in the Format String box. (Tell me more in help topic expands following text )

    The Format String property uses standard .NET Composite Formatting String syntax, which is defined at http://msdn.microsoft.com/en-us/library/txafckwd.aspx

    For example, on the data bindings for a Button control, bind ToolTip to AccountManager and set its Format String = "Click to see Tickets for {0}"

- From AA help topic "Bind Control Properties Collection Editor"

 

I'll verify and update this post next week. Your question will help the doc, so thank you.

Please use plain text.
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Re: This is driving me crazy

[ Edited ]

Ok,

Composite formating syntax is the trick here.

using  works as expected. (open curly brace zero colon P close curly brace)

 

A cleaner example on the editable grid would be nice as well. The one in the help file is very simplistic. An option to have an editible grid from the wizard would be nice as well.

 

where does the drop down in the "Applied Security" get its contents?  My entity (A custom entity in my implementation) I am working with does not have an entry there.  My Entity is exposed properly through SData and functioning properly. I know because we have our own custom app that uses it daily. I'm just now getting around to doing customizations fro the web client.

 

 

Please use plain text.
Employee
lorir-w
Posts: 69
Registered: 04-01-2009

Re: This is driving me crazy

[ Edited ]

Thank you for verifying that composite formatting string syntax is what this property accepts. I'll update the help. I'll also check if it applies to the PickList control property, Name Format String, and the Aggregate control property, Popup Caption Format String.

 

Regarding the Editable Grid control: There are three examples in the help; the first example was intended to be very basic. The second example demonstrates the use of a child entity, and the third example demonstrates consuming an external feed. Let's correspond about more scenarios that should be covered in examples. And I'll submit your suggestion about an option to have an editible grid from the wizard.

 

Regarding Secure Actions, the drop down Applied Security lists only the secured actions provided in the base product and any that you have added through the Web Client (as of 7.5.4) See the Application Architect help topic, "Applied Security".

Please use plain text.