Hello,
How can i set the format of the number to not display the commas? I don't see a format property.
thanks
tom
Thanks Viktor!
This solution worked great!
-Rahul
Hi Rahul,
WebNumericEditor has Culture property, which can be used exactly same way as NumberFormat of WebNumericEdit:
System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");ci.NumberFormat.NumberGroupSizes = new int[]{0};//ci.NumberFormat.NumberDecimalSeparator = ",";//ci.NumberFormat.NumberGroupSeparator = ".";this.WebNumericEditor1.Culture = ci;
Hi Viktor,
I'm using NetAdvantage 9.2 ASP.NET AJAX CLR3x (Infragistics35.Web.v9.2) WebNumericEditor control.
which doesn't provide NumberFormat property. and I want to disable comma.
can you help me out on this how to set NumberFormat property.
here is my code.
<%@ Register Assembly="Infragistics35.Web.v9.2, Version=9.2.20092.1003, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig" %>
<ig:WebNumericEditor ID="WebNumericEditor1" MaxLength="10" DataMode="Ulong" MinDecimalPlaces="0" MaxDecimalPlaces="0" runat="server" />
Thanks,
Rahul
thanks :)
Hi Tom,
Allmost all aspects of format come from NumberFormatInfo class (which is a member of CultureInfo). Among other properties it has XxxxGroupSizes. The Xxx will depend on class of editor: Currency/Numeric/Percent. In order to modify that, you should create an instance of that class, set desired properties and assign it to NumberFormat property of WebNumericEdit. To remove group/thousand separators you may try to use something like [1000] (first group with large number). That can be done anywhere in codes, for example, within Page.OnLoad event.
Installation also provides few samples for custom cultures and formats.