8/14/2025 5:26:28 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
How to format control type of numeric to show no decimals? (in 7.5)
Posted: 28 Oct 08 4:59 PM
|
I have a new detail tab against the Account entity and added a few numeric controls. I want only whole numbers displayed. No decimals, percents, etc. Tell me this is a simple option that I've just overlooked somewhere. All I see is 'Number', 'Percent', 'Decimal', and 'Scientific'.
Where's this set at?
|
|
|
|
Re: How to format control type of numeric to show no decimals? (in 7.5)
Posted: 29 Oct 08 4:22 AM
|
I havent looked in 7.5 but there is no property for this in all of the 7.2 releases. It is likely you will have to do this in the quickformload C# snippet..
Something like: Sage.Entity.Interfaces.IAccount acc = this.BindingSource.Current as Sage.Entity.Interfaces.IAccount;
if (acc.YOURVALUE != null) { YOURTEXTCONTROL.Text = String.Format("{0:N}", acc.YOURVALUE); } YOURTEXTCONTROL.Attributes.Add("onkeypress", "if (((event.keyCode < 48) || (event.keyCode > 57)) & (event.keyCode != 46)) {event.returnValue = false;}");
Ive even added a javascript onkeypress event to the form item to disable users entering any text characters, as error handling is very poor in this respect on the web (it is in 7.2 anyway). |
|
|
|
Re: How to format control type of numeric to show no decimals? (in 7.5)
Posted: 29 Oct 08 4:32 AM
|
I havent looked in 7.5 but there is no property for this in all of the 7.2 releases. It is likely you will have to do this in the quickformload C# snippet..
Something like: Sage.Entity.Interfaces.IAccount acc = this.BindingSource.Current as Sage.Entity.Interfaces.IAccount;
if (acc.YOURVALUE != null) { YOURTEXTCONTROL.Text = String.Format("{0:d}", acc.YOURVALUE); } YOURTEXTCONTROL.Attributes.Add("onkeypress", "if (((event.keyCode < 48) || (event.keyCode > 57)) & (event.keyCode != 46)) {event.returnValue = false;}");
Ive even added a javascript onkeypress event to the form item to disable users entering any text characters, as error handling is very poor in this respect on the web (it is in 7.2 anyway).
Should work....if you cant find a property in 7.5 to set this. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|