Hello,
I have a telerik grid with 2 phone numbers. They are the same other than variable name:
The point of this web page is for the user to update invalid information for the contact.
The biggest missing info is the area code.
The InvalidHomePhoneStyleSelector makes the numbers red and italisized if they aren't 10 numbers.
The PhoneNumberNumericConverter takes the input string and replaces all non numbers with ""
There are 2 problems:
1. Even though I set everything to right alignment, the 7 digit numbers are showing up as (123) 456-7___ instead of (___) 123-4567
2. Typing new characters overwrites instead of inserts. If they set the cursor to the beginning and type in the area code, it overwrites the part of the number they already have. Is there some property I'm missing to make editing insert instead of override?
Fixing the first problem would avoid the second.
Thank you for your help,
James Trimmier
I have a telerik grid with 2 phone numbers. They are the same other than variable name:
<telerik:GridViewDataColumn Width="*"
CellStyleSelector="{StaticResource InvalidHomePhoneStyleSelector}"
DataFormatString="{}{0:(###) ###-####}"
DataMemberBinding="{Binding HomePhone,
Converter={StaticResource PhoneNumberNumericConverter}}"
ShowDistinctFilters="False"
UniqueName="Phone" TextAlignment="Right">
<telerik:GridViewDataColumn.Header>
<TextBlock MaxHeight="32"
Text="{Binding Path=Resource.HomePhone,
Source={StaticResource Messages},
Mode=OneTime}"
TextTrimming="WordEllipsis"
TextWrapping="Wrap" />
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<telerik:RadMaskedTextBox EmptyContent="{Binding Path=Resource.EnterPhone,
Source={StaticResource Messages},
Mode=OneTime}"
FontStyle="Normal"
IsSpinEnabled="False"
Mask="(000) 000-0000"
MaskType="Standard"
Value="{Binding HomePhone,
Mode=TwoWay,
Converter={StaticResource PhoneNumberNumericConverter},
ConverterParameter=String}" TextAlignment="Right" HorizontalContentAlignment="Right" />
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
The point of this web page is for the user to update invalid information for the contact.
The biggest missing info is the area code.
The InvalidHomePhoneStyleSelector makes the numbers red and italisized if they aren't 10 numbers.
The PhoneNumberNumericConverter takes the input string and replaces all non numbers with ""
There are 2 problems:
1. Even though I set everything to right alignment, the 7 digit numbers are showing up as (123) 456-7___ instead of (___) 123-4567
2. Typing new characters overwrites instead of inserts. If they set the cursor to the beginning and type in the area code, it overwrites the part of the number they already have. Is there some property I'm missing to make editing insert instead of override?
Fixing the first problem would avoid the second.
Thank you for your help,
James Trimmier