I have a GridViewthat is inside of a tab control that is inside of a row details on another GridView. When I autogenerate columns in this inner GridView, the GridView's internal horizontal scrollbar appears as expected. But when I try to dynamically set the template for the GridView, even using StaticResource, the scrollbar is nowhere to be found.
I thought this issue might be the tab control's fault, so I switched to the tab control that is in the SDK, but it produced the same results. How do I get the internal scrollbar to appear with while setting a template?
You can see the difference here: No Template VS Template
<
ControlTemplate
x:Key
=
"GridViewTemplate"
TargetType
=
"telerik:RadGridView"
>
<
telerik:RadGridView
Name
=
"RadGridView1"
HorizontalAlignment
=
"{TemplateBinding HorizontalAlignment}"
VerticalAlignment
=
"{TemplateBinding VerticalAlignment}"
AutoGenerateColumns
=
"{TemplateBinding AutoGenerateColumns}"
IsReadOnly
=
"{TemplateBinding IsReadOnly}"
ItemsSource
=
"{TemplateBinding ItemsSource}"
RowIndicatorVisibility
=
"{TemplateBinding RowIndicatorVisibility}"
SelectedItem
=
"{TemplateBinding SelectedItem}"
ShowGroupPanel
=
"{TemplateBinding ShowGroupPanel}"
ShowInsertRow
=
"{TemplateBinding ShowInsertRow}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Width
=
"300"
Header
=
"Char"
IsFilterable
=
"True"
IsSortable
=
"True"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
ControlTemplate
>
<
telerik:RadGridView
Width
=
"800"
Height
=
"600"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
AutoGenerateColumns
=
"True"
ItemsSource
=
"{Binding Items}"
ShowGroupPanel
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewToggleRowDetailsColumn
ExpandMode
=
"Single"
/>
</
telerik:RadGridView.Columns
>
<
telerik:RadGridView.RowDetailsTemplate
>
<
DataTemplate
>
<
telerik:RadTabControl
>
<
telerik:RadTabItem
Header
=
"Where is my scrollbar?"
>
<
telerik:RadGridView
Height
=
"200"
Margin
=
"10"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding}"
ShowGroupPanel
=
"False"
Template
=
"{StaticResource GridViewTemplate}"
/>
</
telerik:RadTabItem
>
</
telerik:RadTabControl
>
</
DataTemplate
>
</
telerik:RadGridView.RowDetailsTemplate
>
</
telerik:RadGridView
>
I thought this issue might be the tab control's fault, so I switched to the tab control that is in the SDK, but it produced the same results. How do I get the internal scrollbar to appear with while setting a template?
You can see the difference here: No Template VS Template