This is a migrated thread and some comments may be shown as answers.

RadMaskedTextBox databinding bug?

1 Answer 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tomas
Top achievements
Rank 1
Tomas asked on 25 Mar 2009, 12:02 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 26 Mar 2009, 03:30 PM
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.
Tags
General Discussions
Asked by
Tomas
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or