Hi,
We want to use RadMaskedTextBox with a OneWay binding but it seems to only support OneTime and TwoWay, even if we explicitly set it to OneWay:
Is there something else we have to set in the xaml of the RadMaskedTextBox to make it a OneWay binding instead of a OneTime binding?
Regards,
Niels
P.S. Our email still seems blocked eventho we filled out the white list form, the error we get is:
We want to use RadMaskedTextBox with a OneWay binding but it seems to only support OneTime and TwoWay, even if we explicitly set it to OneWay:
<telerikInput:RadMaskedTextBox Grid.Column="1"If we use the standard Microsoft component it works fine (with or without OneWay which is default):
MaskType="None"
Value="{Binding TextEntity.Perceel, Mode=OneWay}" />
<TextBox Grid.Column="1"
Text="{Binding TextEntity.Nr1}" />
Is there something else we have to set in the xaml of the RadMaskedTextBox to make it a OneWay binding instead of a OneTime binding?
Regards,
Niels
P.S. Our email still seems blocked eventho we filled out the white list form, the error we get is:
Mike.DeBenedictis@telerik.com
exchbg01.telerik.com #550 5.7.1 Unfortunately our system blocks your IP address.To help us white list your email address, please fill out this form http://www.telerik.com/company/contact-us/unblock-ip.aspx Legitimate requests will be processed within 1 business day. ##
5 Answers, 1 is accepted
0
Hi Niels,
RadMaskedTextBox supports OneWay binding,in the attached image you can see that in the Intellisense OneWay,OneTime and TwoWay bindings appeared.
Would you try to clean your solution,rebuild it again and set the binding mode to OneWay and please let me know if you have any troubles.
All the best,
Vanya Pavlova
the Telerik team
RadMaskedTextBox supports OneWay binding,in the attached image you can see that in the Intellisense OneWay,OneTime and TwoWay bindings appeared.
Would you try to clean your solution,rebuild it again and set the binding mode to OneWay and please let me know if you have any troubles.
All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Niels
Top achievements
Rank 1
answered on 13 Aug 2010, 03:05 PM
Hi Vanya,
Yes, the OneWay appears in intellisense, but when I set it to OneWay it still does OneTime. Even after I do a "Clean solution" and a "Rebuild solution". I also cleared the internet browser cache to be safe. Below is the code I use now, the TextBox changes when I change ZaakItem, but the RadMaskedTextBox gets the contents of the first ZaakItem.
If I restart the application and choose a different ZaakItem the RadMaskedTextBox does change, but again only once, so it really looks like the binding is fine and different ZaakItem get assigned properly, but it is OneTime, not OneWay. We use Prism/Unity to connect the View to the ViewModel could it be that RadMaskedTextBox doesn't fully support Prism? We have the same problem with RadDatePicker.
Regards,
Niels
Yes, the OneWay appears in intellisense, but when I set it to OneWay it still does OneTime. Even after I do a "Clean solution" and a "Rebuild solution". I also cleared the internet browser cache to be safe. Below is the code I use now, the TextBox changes when I change ZaakItem, but the RadMaskedTextBox gets the contents of the first ZaakItem.
If I restart the application and choose a different ZaakItem the RadMaskedTextBox does change, but again only once, so it really looks like the binding is fine and different ZaakItem get assigned properly, but it is OneTime, not OneWay. We use Prism/Unity to connect the View to the ViewModel could it be that RadMaskedTextBox doesn't fully support Prism? We have the same problem with RadDatePicker.
Regards,
Niels
<telerikInput:RadMaskedTextBox Value="{Binding ZaakItem.ZaakIdentificatie, Mode=OneWay}"
MaskType="None"
IsReadOnly="True"
Margin="0,0,0,2">
<ToolTipService.ToolTip>
<ToolTip Content="Zaak identificatie"></ToolTip>
</ToolTipService.ToolTip>
</telerikInput:RadMaskedTextBox>
<TextBox Text="{Binding ZaakItem.OmschrijvingKort}"
IsReadOnly="True"
Margin="0,0,0,2">
<ToolTipService.ToolTip>
<ToolTip Content="Korte omschrijving"></ToolTip>
</ToolTipService.ToolTip>
</TextBox>
0
Accepted
Hi Niels,
We should look into this issue more thoroughly, but in the meantime I noticed that the MaskedTextBox is ReadOnly. This means that it is safe to enable the TwoWay binding which will act as OneWay since the textbox is read only and you cannot type in it:
Hope this helps.
Sincerely yours,
Veselin Vasilev
the Telerik team
We should look into this issue more thoroughly, but in the meantime I noticed that the MaskedTextBox is ReadOnly. This means that it is safe to enable the TwoWay binding which will act as OneWay since the textbox is read only and you cannot type in it:
<
TextBlock
Text
=
"Type something:"
/>
<
TextBox
Name
=
"txtSource"
Width
=
"100"
/>
<
telerik:RadMaskedTextBox
Value
=
"{Binding Text, ElementName=txtSource}"
MaskType
=
"None"
IsReadOnly
=
"True"
Margin
=
"0,0,0,2"
>
</
telerik:RadMaskedTextBox
>
<
TextBox
Text
=
"{Binding Text, ElementName=txtSource}"
IsReadOnly
=
"True"
Margin
=
"0,0,0,2"
>
</
TextBox
>
Hope this helps.
Sincerely yours,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Mike Wishart
Top achievements
Rank 1
answered on 06 Oct 2010, 11:55 PM
This is a problem in the WPF version of the control as well. A RadMaskedTextBox that is set as ReadOnly with a OneWay binding will only be updated once. It does work when changed to a TwoWay binding, but this is especially inconvenient when bound to a readonly property. You wind up with some ugly code in the viewmodel:
public
byte
DrawerNumber
{
get
{
return
_slot ==
null
? (
byte
)0 : _slot.SlotNumber; }
set
{ }
// OneWay bindings don't seem to work with RadMaskedTextBox
}
_slot =
null
;
NotifyPropertyChanged(
"DrawerNumber"
);
...
_slot = board;
NotifyPropertyChanged(
"DrawerNumber"
);
0
Hello Mike Wishart,
You are right. I have logged the bug in our public issue tracking system and you can monitor its progress here.
Best wishes,
Veselin Vasilev
the Telerik team
You are right. I have logged the bug in our public issue tracking system and you can monitor its progress here.
Best wishes,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items