MaskEditBox loses value

6 posts, 0 answers
  1. Erin
    Erin avatar
    9 posts
    Member since:
    Sep 2008

    Posted 26 Feb 2009 Link to this post

    I have a MaskEditBox for a phone number.  When I click out or tab out of the maskeditbox the value is replaced with (___) ___-____.  Is there a property that I need to set or some other workaround to fix this?
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 02 Mar 2009 Link to this post

    Hi Erin,

    Thank you for contacting us.

    How do you set the value in the maskeditbox? Using the Value property or the Text property? The right way is to use the Value property of the control.

    I'm looking forward to your reply.

    Regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Erin
    Erin avatar
    9 posts
    Member since:
    Sep 2008

    Posted 03 Mar 2009 Link to this post

    I was using the Text property, switching it to the Value property has cleared up this issue. 
  5. Bob
    Bob avatar
    9 posts
    Member since:
    Apr 2009

    Posted 01 Jun 2009 Link to this post

    I am experiencing similar behavior but my MaskedEditBox is datetime and when I try to write .value instead of .text nothing is displayed.
  6. Bob
    Bob avatar
    9 posts
    Member since:
    Apr 2009

    Posted 01 Jun 2009 Link to this post

    Modified my code from:
     
     txtDateOfBirth.Value = ClientDataTable.Rows(0).Item("DateOfBirth")

    To:
     
     txtDateOfBirth.Value = Convert.ToDateTime(ClientDataTable.Rows(0).Item("DateOfBirth"))

    Works fine :)
  7. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 02 Jun 2009 Link to this post

    Hello guys,

    I am glad that everything works fine now! If you have further questions, do not hesitate to contact us.

    Sincerely yours,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for WinForms is Visual Studio 2017 Ready