3 Answers, 1 is accepted
Have you tried to use StringFormat property of the column DataMemberBinding?
All the best,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I tried
<telerik:GridViewMaskedTextBoxColumn Header="Password" DataMemberBinding="{Binding Password}" MaskType="None" Mask="####" DataFormatString="{}{0:####}" />
Now, both display and edit did not mask. I want to allow 4 digit or character entered into this column. Display and edit mode both are masked with #.
<telerik:RadGridView Name="myGrid" Grid.Row="1" AutoGenerateColumns="False" DataLoadMode="Asynchronous" CanUserReorderColumns="False" IsFilteringAllowed="False" Margin="10,5,5,15" ShowGroupPanel="False" CanUserDeleteRows="True" IsReadOnly="False" RowEditEnded="myGrid_RowEditEnded_1" Deleted="myGrid_Deleted_1"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="User Name" DataMemberBinding="{Binding UserName}" /> <telerik:GridViewMaskedTextBoxColumn Header="Password" DataMemberBinding="{Binding Password}" MaskType="None" Mask="####" DataFormatString="{}{0:####}" /> </telerik:GridViewColumn> </telerik:RadGridView.Columns> </telerik:RadGridView>The mask in edit mode does not work as you have set MaskType="None", please set it to "Standard" instead. If you have entered 4 symbols, then four symbols will be displayed in View mode.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
