RadMaskedTextBox databinding bug?

2 posts, 0 answers
  1. Tomas
    Tomas avatar
    9 posts
    Member since:
    Feb 2009

    Posted 25 Mar 2009 Link to this post

    I have replaced some TextBox controls with RadMaskedTextBox controls in a few dialogs.

    sample:

     

    <telerikInput:RadMaskedTextBox Name="somedata" MaskType="Numeric" Mask="" Value="{Binding Source={StaticResource somesource}, Path=somedata}"/> 

     

     

     

    After the replacement, the databinding only works for setting the data upon loading. When retrieving the data after closing the dialog, the fields have not changed.

    The same databinding using a TextBox works fine.

    I have circumvented the problem by manually setting the data upon closing the dialog, but that is obviously not a very good solution.

    SomeObject r = (SomeObject)(((ObjectDataProvider)datagrid.Resources["somesource"]).ObjectInstance);  
    r.somedata = Convert.ToInt16(this.somedata.Value); 

    Any suggestions would be most welcome.

    Best regards,
    Tomas

     

  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 26 Mar 2009 Link to this post

    Hi Tomas,

    Please find attached a sample project that demonstrates how to bind a property of MaskedTextBox  to another custom property.
    If this still does not answer your question please send us a sample project so that we are able to reproduce your issue.


    Kind regards,
    Boryana
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top