Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
WebNumberEdit with no commas?
posted

Is it possible to have it display just the straight digits without reformating it and inserting the thousands commas?  I can't seem to find anyway to do this.

  • 24497
    Suggested Answer
    posted

    Hi,

    Editors use .net standards for its formats. Unfortunately usage of those "format" objects needs some experience. You may configure culture for whole application using CurrentThread.CurrentCulture, or you may customize every particular instance of editor. Since .net does not support view state of CultureInfo, all custom formats are possible to implement only in codes behind for every load. Below is example for Page.OnLoad event:

    System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
    System.Globalization.NumberFormatInfo ni = ci.NumberFormat;
    ni.NumberGroupSizes = new int[]{0};
    this.WebNumericEdit1.NumberFormat = ni;