I'm replacing a plain textbox control that I had, with a RadMaskedNumericInput control, in a VS 2012 app. This control is to handle a client's social security number. However, in testing it I've found it doesn't exactly do what I want it to do. Here's the XAML:
<telerik:RadMaskedNumericInput x:Name="txtSSN" MinWidth="80" Text="{Binding SocialSecurityNo, UpdateSourceTrigger=PropertyChanged}" Mask="###-##-####" VerticalContentAlignment="Center" FontSize="15" Margin="3,0" BorderBrush="#FFE3E9EF" InputBehavior="Insert" />With this, when the window first comes up, it looks like this: "___-__-___0". So if the user starts typing in a SSN, the problem becomes apparent. The 0, at the end of the control, starts getting pushed along. For example, suppose the user wanted to enter "123-45-6789" as a SSN. When they start typing what they get is, "___-__-__01". By the time they get to entering all digits from 1 to 9, in order, what they wind up with in the control is this: "012-34-5679". That is not what they want, but I don't know to make it work properly. Most likely I defined some property wrong, or left a property out. So, how do we achieve what we're trying to achieve?
<telerik:GridViewDataColumn Header="Device Type" Width="Auto" DataMemberBinding="{Binding Path=DeviceTypeDescription}" UniqueName="DeviceTypeDescription" /><telerik:RadGridView.GroupDescriptors><telerik:ColumnGroupDescriptor Column="{Binding Columns[\DeviceTypeDescription\], ElementName=GridView}" SortDirection="Ascending" /></telerik:RadGridView.GroupDescriptors><telerik:GridViewDataColumn DataMemberBinding="{Binding HoursValue}" ColumnGroupName="HoursInfo"
HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle1}" Width="100" HeaderTextAlignment="Center">
<telerik:GridViewColumn.Header>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="Hours "/>
<TextBlock Text="{Binding ElementName=chkCompYear, Path=Content}"/> // here binding is not working
or
<TextBlock Text="{Binding Year}"/> // here binding is not working
</StackPanel>
</telerik:GridViewColumn.Header>
</telerik:GridViewDataColumn>
<CheckBox Name="chkYear" Content="{Binding Year}" // Here it is working
Model
-----
public string Year {get; set;}
I can able to bind the data to checkbox which is outside the RadGridview, But I cant bind the header.
Pls help me out to resolve this