I was trying to follow along the demo RadControls for WPF -> Data -> GridView -> Appearance -> Custom Row Layout.
I am using a dataset as data source. It works fine by default but I can't bind to columns after I apply RowStyle property. I set up a 3 by 2 grid as custom layout and I can see the TextBlocks that are labels. The TextBlocks that I bind columns do not display data. Any ideas?
Here is my template
and gridview
Thanks
I am using a dataset as data source. It works fine by default but I can't bind to columns after I apply RowStyle property. I set up a 3 by 2 grid as custom layout and I can see the TextBlocks that are labels. The TextBlocks that I bind columns do not display data. Any ideas?
Here is my template
<
ControlTemplate
x:Key
=
"MyCustomRowTemplate"
TargetType
=
"telerik:GridViewRow"
>
<
Border
x:Name
=
"rowsContainer"
Background
=
"#FF525252"
Padding
=
"8,8,8,0"
>
<
Border
Background
=
"{StaticResource Office_BlackRowBackground}"
x:Name
=
"selectedRow"
BorderThickness
=
"1"
BorderBrush
=
"#FF000000"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"Code:"
Grid.Column
=
"0"
Grid.Row
=
"0"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Foreground
=
"White"
FontWeight
=
"Bold"
Margin
=
"0,15,15,0"
/>
<
TextBlock
Text
=
"{Binding CD}"
Grid.Column
=
"1"
Grid.Row
=
"0"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Foreground
=
"White"
Margin
=
"0,15,15,0"
/>
<
TextBlock
Text
=
"Description:"
Grid.Column
=
"0"
Grid.Row
=
"1"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Foreground
=
"White"
FontWeight
=
"Bold"
Margin
=
"0,15,15,0"
/>
<
TextBlock
Text
=
"{Binding DESC}"
Grid.Column
=
"1"
Grid.Row
=
"1"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Foreground
=
"White"
Margin
=
"0,15,15,0"
/>
<
TextBlock
Text
=
"Enabled:"
Grid.Column
=
"0"
Grid.Row
=
"2"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Foreground
=
"White"
FontWeight
=
"Bold"
Margin
=
"0,15,15,0"
/>
<
TextBlock
Text
=
"{Binding ENABLED}"
Grid.Column
=
"1"
Grid.Row
=
"2"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Foreground
=
"White"
Margin
=
"0,15,15,0"
/>
</
Grid
>
</
Border
>
</
Border
>
</
ControlTemplate
>
and gridview
<
telerik:RadGridView
Grid.Row
=
"2"
Name
=
"radGridView2"
ItemsSource
=
"{Binding}"
Margin
=
"5,5,5,5"
HorizontalAlignment
=
"Left"
Visibility
=
"Hidden"
IsFilteringAllowed
=
"False"
RowSytle="{StaticResource rowStyle}"
ShowGroupPanel
=
"False"
ShowColumnHeaders
=
"False"
RowIndicatorVisibility
=
"Collapsed"
CanUserReorderColumns
=
"False"
/>
Thanks