Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > NumericUpDown > Hiding ","

Not answered Hiding ","

Feed from this thread
  • Alex Wu avatar

    Posted on Jan 28, 2010 (permalink)

    I want to hide the "," comma character in value. For example, instead of displaying "2,010" I want to display "2010"

    Reply

  • Konstantina Konstantina admin's avatar

    Posted on Feb 1, 2010 (permalink)

    Hi Alex,

    Thank you for contacting us.

    If you want to remove the comma in the digit, you can use the IsInteger property of the NumericUpDown. If you set IsInteger="True" that will return the value as integer and you won't have the comma.

    If you have further questions please feel free to contact us again.

    Greetings,
    Konstantina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

    Reply

  • Terry Intermediate avatar

    Posted on Jul 27, 2010 (permalink)

    This is not working for me

    the xaml:

    <telerik:RadNumericUpDown x:Name="txtNextInvoiceNo" Grid.Row="3" Grid.Column="1" IsInteger="True" />

    the c#:

    InvokeOperation<int> op = wdc.GetNextInvoiceNo( app.CompanyID );
    op.Completed += ( sender, args ) =>
    {
        if ( op.Error == null )
        {
            int result = op.Value;
            txtNextInvoiceNo.Value = Convert.ToDouble( result );
        }
    }; 

    the result:
    2,007,027

    I'm using the Q2 SL4 release.

    Thanks in advance for your help,

    Terry


    Reply

  • Konstantina Konstantina admin's avatar

    Posted on Jul 28, 2010 (permalink)

    Hi Terry,

    Thank you for contacting us.

    This comma is not the one for the double digit, it is the string that separates groups of digits to the left of the decimal in numeric values. You can easily remove that by setting the NumberGroupSeparator property to an empty string:

    this.txtNextInvoiceNo.NumberFormatInfo.NumberGroupSeparator = "";

    If you have further questions please let us know.

    Greetings,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Posted on Mar 18, 2011 (permalink)

    Hi Konstantina,

    Your code is working fine, however, how should we do that in the XAML? I did see a blog, but that was about WPF and gave an error:

    <telerik:RadNumericUpDown Name="rnt_Port" .... >
        <telerik:RadNumericUpDown.NumberFormatInfo NumberGroupSeparator="">
            <Globalization:NumberFormatInfo NumberGroupSeparator="0" />
        </telerik:RadNumericUpDown.NumberFormatInfo>
    </telerik:RadNumericUpDown>

    but the tag <Globalization:NumberFormatInfo results in an error... can't seem to find it anywhere..

    (Tags: thousands separator, group separator)

    Reply

  • George George admin's avatar

    Posted on Mar 18, 2011 (permalink)

    Hi,

     
    Unfortunately, setting a number format in xaml is a limitation of Silverlight. I would suggest you to set it in the code-behind.

    Kind regards,
    George
    the Telerik team

    Reply

  • Posted on Mar 18, 2011 (permalink)

    stoobad... :-)

    Reply

  • Posted on Sep 2, 2011 (permalink)

    Hello Konstantina and George,

    In my new version this behaviour generates an error...

    this.txtNextInvoiceNo.NumberFormatInfo.NumberGroupSeparator = "";
    The NumberFormatInfo property is Nothing... (in vb.net)
    It has worked before but now generates an error...

    Regards,

    Erik

    Reply

  • Ivo Ivo admin's avatar

    Posted on Sep 6, 2011 (permalink)

    Hello Erik,

    This should do the trick for you:

    this.txtNextInvoiceNo.NumberFormatInfo = new System.Globalization.NumberFormatInfo();
    this.txtNextInvoiceNo.NumberFormatInfo.NumberGroupSeparator = "";

    Hope this helps.

    Greetings,
    Ivo
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > NumericUpDown > Hiding ","
Related resources for "Hiding ",""

Silverlight NumericUpDown Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]