Hi telerik,
I'm trying to bind numeric decimal point dynamically in GridViewCell,
and tried to use GridViewMaskedTextBoxColumn,however, Mask property is not
bindable as addressed in many threads here.
So, I added RadMaskedTextBox as cell DataTemplate and binded his Mask into my ViewModel's
property. So far so good except one thing.
Every cell shows 2 border,one is gridView cell's border and the other is RadMaskedTextBox's border.
Though I tried to set RadMaskedTextBox's Border as transparent and 0 thickness,it's useless.
How can I show that cell same look and feel with normal gridview cell when it is readonly state ?
Follwoing is my XAML snippet. Thank you in advance.
Kang
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadMaskedTextBox
Value
=
"{Binding Path=CustQty}"
Style
=
"{StaticResource QtyMaskStyle}"
Mask
=
"{Binding Path=QtyFormat, Source={StaticResource stockSearchViewModelViewSource}}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
Style
x:Key
=
"QtyMaskStyle"
TargetType
=
"telerik:RadMaskedTextBox"
>
<
Setter
Property
=
"BorderBrush"
Value
=
"Transparent"
/>
<
Setter
Property
=
"FontSize"
Value
=
"{StaticResource NormalFontSize}"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Right"
/>
<
Setter
Property
=
"Foreground"
Value
=
"Black"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"MaskType"
Value
=
"Numeric"
/>
<
Setter
Property
=
"IsSpinEnabled"
Value
=
"False"
/>
</
Style
>