Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Editors (TextBox, MaskedEdit, SpinEditor, BrowseEditor, ColorBox) > MaskedEditBox ValueChanged

Not answered MaskedEditBox ValueChanged

Feed from this thread
  • Mauricio avatar

    Posted on Dec 12, 2011 (permalink)

    Hi!

    I've been having trouble with the maskededitbox valuechanged event. Please check the following example:

    Private Sub RadMaskedEditBox1_ValueChanging(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles RadMaskedEditBox1.ValueChanging
     
    MessageBox.Show("Value=" & RadMaskedEditBox1.Value)
     
    End Sub

    It does not show the proper value.

    Also, I'd like to know if there is a way to disable the increase/decrease value using the up/down arrows.
     
    Thanks for your help.

    Reply

  • Peter Peter admin's avatar

    Posted on Dec 15, 2011 (permalink)

    Hi Mauricio,

    Thank you for writing.

    At this moment the value is not changed yet. So it is normal to get the old value in this event.
    You can get the actual value on ValueChanged event. Please refer to code snippet which demonstrates you can cancel the RadMaskedEditBox value based on a certain condition.

    dim oldValue as Object = ""
    Private Sub RadMaskedEditBox1_ValueChanging( sender As System.Object,  e As System.ComponentModel.CancelEventArgs) Handles RadMaskedEditBox1.ValueChanging
            me.oldValue = RadMaskedEditBox1.Value
    End Sub
     'prevent user to enter 7 as single value
    Private Sub RadMaskedEditBox1_ValueChanged( sender As System.Object,  e As System.EventArgs) Handles RadMaskedEditBox1.ValueChanged
      if me.RadMaskedEditBox1.Value = 7 then
                me.RadMaskedEditBox1.Value = oldValue
      End If

    I hope this helps. Kind regards,
    Peter
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Editors (TextBox, MaskedEdit, SpinEditor, BrowseEditor, ColorBox) > MaskedEditBox ValueChanged
Related resources for "MaskedEditBox ValueChanged"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]