How to remove the GroupSeparator in Telerik’s RadNumericUpDown?

How to remove the GroupSeparator in Telerik’s RadNumericUpDown?

If you are a Silverlight developer and working with Telerik’s Rad control library, you might have seen that the RadNumericUpDown control always displays the value with a comma separator as per your system’s locale settings.


But have you ever came to a situation where your client wants to remove the comma separator from the control? You will not find any properties in-built in it. Let’s start today’s discussion with it.


Today in this post we will learn how to remove the comma separator from the Telerik’s RadNumericUpDown control. You can see a screenshot below where the Numeric input box uses the comma separator by default (left) and another Numeric input box which does not use any separator (right). Let’s start implementing the same for our demo.


How to remove the GroupSeparator in Telerik's RadNumericUpDown?


Let’s create a Behavior of type RadNumericUpDown control which we will be able to plug into the Numeric UpDown control wherever we need it. To create a behavior, you must have to add the reference of “System.Windows.Interactivity.dll” in your project. Then create a class named “GroupSeparatorBehavior” and inherit “Behavior<RadNumericUpDown>”.


The next step is to override the OnAttached() method and assign NumberFormatInfo property with a new instance and set it’s NumberGroupSeparator property to empty string.


Here is the code snippet of the behavior class that we created just now:


public class GroupSeparatorBehavior : Behavior<RadNumericUpDown>
    protected override void OnAttached()
        AssociatedObject.NumberFormatInfo = new NumberFormatInfo { NumberGroupSeparator = "" };


Now to hook the above behavior to your RadNumericUpDown control, first you need to add the XMLNS namespace to the XAML page as shown below:




Remember that, it should point to the System.Windows.Interactivity dll reference as mentioned above or you can directly provide the assembly and namespace information to it.


Now hook the behavior to the control as shown below:


<telerik:RadNumericUpDown Minimum="0" Maximum="500000" Value="450000"
                          Height="26" Width="100">


Now once you run the Silverlight application, you will not see the Number Group Separator i.e. comma any more to the RadNumericUpDown control that you specified by attaching the behavior.


I hope that, this small post was useful to you to learn and implement the said behavior in your application. Have any queries? Don’t hesitate to ask me below. Happy Coding. Cheers!

If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.


  1. Thanks for your help.This is my problem

    1. Glad to know that, the post was helpful to you... :)

  2. Where does the name "radNumericDemo" come from in the tag ? I can't tell if I need to replace that with something else in my application. Thank you!

    1. Hi Derek,

      That's the xmlns namespace of the behavior that I created. In my demo, I declared it as "radNumericDemo". You can choose anything here while using the behavior but make sure to declare as xmlns namespace.

    2. Ah, I see. That works - thanks!


© 2008-2018 - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top