Hi All ,
I need advise and guide, i have difficult dealing with radgridview (wpf), i want to bind a column image with dynamic path value, the images is stored in "[solutionpath]/Resources/Images/", I wonder why i have a message that the path is not found.
Assumed bind value for image path is "../Resources/Images/icon.jpg".
I have these piece of code :
Thanks
I need advise and guide, i have difficult dealing with radgridview (wpf), i want to bind a column image with dynamic path value, the images is stored in "[solutionpath]/Resources/Images/", I wonder why i have a message that the path is not found.
Assumed bind value for image path is "../Resources/Images/icon.jpg".
I have these piece of code :
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
Grid.Resources
>
<
local:KPI_Diff_Style
x:Key
=
"_DiffStyle"
>
<
local:KPI_Diff_Style.UpStyle
>
<
Style
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"Background"
Value
=
"Red"
/>
</
Style
>
</
local:KPI_Diff_Style.UpStyle
>
<
local:KPI_Diff_Style.DownStyle
>
<
Style
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"Background"
Value
=
"Yellow"
/>
</
Style
>
</
local:KPI_Diff_Style.DownStyle
>
<
local:KPI_Diff_Style.EqStyle
>
<
Style
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"Background"
Value
=
"Green"
/>
</
Style
>
</
local:KPI_Diff_Style.EqStyle
>
</
local:KPI_Diff_Style
>
</
Grid.Resources
>
<
telerik:RadGridView
x:Name
=
"gridKPI"
CanUserFreezeColumns
=
"False"
ItemsSource
=
"{Binding}"
ShowGroupPanel
=
"False"
GridLinesVisibility
=
"Horizontal"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding KPINameDisplay}"
Header
=
"KPI Trends"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding KPIName}"
Header
=
"KPI Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding MapKPIColumnName}"
Header
=
"KPI Column Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding StartDate}"
Header
=
"Start Date"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding EndDate}"
Header
=
"End Date"
/>
<
telerik:GridViewImageColumn
DataMemberBinding
=
"{Binding ImageUpDown}"
Header
=
"Difference"
ImageStretch
=
"None"
CellStyleSelector
=
"{StaticResource _DiffStyle}"
MinWidth
=
"5"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ImageView}"
Header
=
"View"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Button
Content
=
"View Details"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
Thanks