Hello,
I have set up an editable column, with separate templates for view and edit defined.
The reason for the two separate templates is that I need the values formatted differently for viewing and editing.
I can enter into edit mode, i.e. I see the blinking cursor, but I cannot enter any values; backspace works strangely enough, so I can delete any existing value but when I try and enter it fails.
I'd like to know what is wrong with a column setup in this manner.
Thank You
Hasanain
I have set up an editable column, with separate templates for view and edit defined.
<
telerik:GridViewDataColumn
Name
=
"TargetPercentOfAccountMarketValue"
Header
=
"% Of Total"
Width="75" HeaderCellStyle="{StaticResource columnHeaderStyle}"
CellStyle="{StaticResource whatIfCell}"
DisplayIndex="8" EditTriggers="CellClick,TextInput"
IsReadOnlyBinding="{Binding NodeType, Converter={StaticResource nodeTypeToIsReadOnlyConverter}}"
ColumnGroupName="WhatIfAllocation">
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Node.TargetPercentOfAccountMarketValue, StringFormat={}{0:P1}}"
Foreground="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource negativeColorFormatter}, UpdateSourceTrigger=PropertyChanged}">
</
TextBlock
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
TextBox
BorderBrush
=
"Transparent"
BorderThickness
=
"1"
Text
=
"{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource StringToPercentageConverter}, StringFormat={}{0:N2}}"
Background
=
"Transparent"
Foreground="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource negativeColorFormatter}}"/><
br
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
The reason for the two separate templates is that I need the values formatted differently for viewing and editing.
I can enter into edit mode, i.e. I see the blinking cursor, but I cannot enter any values; backspace works strangely enough, so I can delete any existing value but when I try and enter it fails.
I'd like to know what is wrong with a column setup in this manner.
Thank You
Hasanain