This question is locked. New answers and comments are not allowed.
I have a RGV with a calculatedcolumn working from an expression in code behind
this is working great. I want to "move" this calculation to a TextBlock in the details row and depricate the GVExpressionColumn. The datatemplate for the details row is below and the TextBlock is "txt_EF_Price".
This calculation is from Bindings on the details row and is simply basePrice - diffPrice
Thank you for your help.
(dg_tblPOLines.Columns["ex_Poundage"] as GridViewExpressionColumn).Expression = exp;
this is working great. I want to "move" this calculation to a TextBlock in the details row and depricate the GVExpressionColumn. The datatemplate for the details row is below and the TextBlock is "txt_EF_Price".
This calculation is from Bindings on the details row and is simply basePrice - diffPrice
<
UserControl
x:Class
=
"RoasterWerks.DataTemplates.POItemDetailTemplate"
<
Grid
Width
=
"Auto"
HorizontalAlignment
=
"Stretch"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"20"
/>
<
RowDefinition
Height
=
"20"
/>
<
RowDefinition
Height
=
"20"
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"10"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"60"
/>
<
ColumnDefinition
Width
=
"20"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"30"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"30"
/>
<
ColumnDefinition
Width
=
"20"
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"Base Price: "
Margin
=
"5,0,0,0"
Grid.Row
=
"0"
Grid.Column
=
"1"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
TextBlock
Text
=
"{Binding basePrice, StringFormat=\{0:$##0.0000\}}"
Margin
=
"5,0,5,0"
Grid.Row
=
"0"
Grid.Column
=
"2"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
TextBlock
Text
=
"Differential: "
Margin
=
"5,0,0,0"
Grid.Row
=
"1"
Grid.Column
=
"1"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
TextBlock
Text
=
"{Binding diffPrice, StringFormat=\{0:$##0.0000\}}"
Margin
=
"5,0,5,0"
Grid.Row
=
"1"
Grid.Column
=
"2"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
TextBlock
Text
=
"Effective Price: "
FontWeight
=
"Bold"
Margin
=
"5,0,0,0"
Grid.Row
=
"2"
Grid.Column
=
"1"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
TextBlock
x:Name
=
"txt_EF_Price"
Margin
=
"5,0,0,0"
Grid.Row
=
"2"
Grid.Column
=
"2"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
Border
Grid.Column
=
"3"
Grid.Row
=
"0"
Grid.RowSpan
=
"3"
Width
=
"1"
Background
=
"#FFA0AFC3"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Center"
Margin
=
"0,10"
/>
<
TextBlock
Text
=
"Certifications"
FontWeight
=
"Bold"
Grid.Row
=
"0"
Grid.Column
=
"4"
Grid.ColumnSpan
=
"4"
HorizontalAlignment
=
"Center"
/>
<
TextBlock
Text
=
"Exchange: "
Margin
=
"5,0,0,0"
Grid.Row
=
"1"
Grid.Column
=
"4"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
Image
Source
=
"{Binding isCert, Converter={StaticResource BoolToImageConverter}}"
Grid.Column
=
"5"
Grid.Row
=
"1"
/>
<
TextBlock
Text
=
"Fair Trade: "
Margin
=
"5,0,0,0"
Grid.Row
=
"2"
Grid.Column
=
"4"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
Image
Source
=
"{Binding isFairTrade, Converter={StaticResource BoolToImageConverter}}"
Grid.Column
=
"5"
Grid.Row
=
"2"
/>
<
TextBlock
Text
=
"Organic: "
Margin
=
"5,0,0,0"
Grid.Row
=
"1"
Grid.Column
=
"6"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
Image
Source
=
"{Binding isOrganic, Converter={StaticResource BoolToImageConverter}}"
Grid.Column
=
"7"
Grid.Row
=
"1"
/>
<
TextBlock
Text
=
"Rainforest: "
Margin
=
"5,0,0,0"
Grid.Row
=
"2"
Grid.Column
=
"6"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Left"
/>
<
Image
Source
=
"{Binding isRainForest, Converter={StaticResource BoolToImageConverter}}"
Grid.Column
=
"7"
Grid.Row
=
"2"
/>
<
Border
Grid.Column
=
"8"
Grid.Row
=
"0"
Grid.RowSpan
=
"3"
Width
=
"1"
Background
=
"#FFA0AFC3"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Center"
Margin
=
"0,10"
/>
</
Grid
>
</
UserControl
>
Thank you for your help.