Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > the display value and the stored value doesn't match

Not answered the display value and the stored value doesn't match

Feed from this thread
  • P avatar

    Posted on Sep 8, 2011 (permalink)

    Scenario:
    enter "123" and then enter "-", the textbox displays -12 instead of 123 and when i fetch the value using tbNumeric.Value it is "123" which is what i expected. 

    Any idea?


    xaml:
    <telerik:RadMaskedTextBox Name="tbNumeric" 
    MaskType="Numeric"
    Mask="d"
    Value=""
    ValueChanging="NumberInput_ValueChanging"  />

    code behind is: 
    private void NumberInput_ValueChanging(object sender,
    Telerik.Windows.Controls.RadMaskedTextBoxValueChangingEventArgs e)
            {
                if (e.NewValue != null)
                {
                    e.Handled = ((double)e.NewValue < 0);
                }
            }

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Sep 14, 2011 (permalink)

    Hello P,

     We agree that this does not work correctly in the RadMaskedTextBox. We highly suggest you to use the new RadMaskedNumericInput control which handles this scenario nice. You can examine this in the attached solution. Please let us know if you need more info on this.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

  • Alan avatar

    Posted on Oct 19, 2011 (permalink)

    Can you provide some guidance on using the Radnumericinput control to allow a user to enter a negative numeric value

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Oct 24, 2011 (permalink)

    Hello Alan,

     You can start with this demo of the RadMaskedInput control. Pressing the "-" key sets minus and makes the entered number negative. Pressing this key second time sets back the number to positive and so on. Do you actually need something more specific ?

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > the display value and the stored value doesn't match
Related resources for "the display value and the stored value doesn't match"

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