<UserControl x:Class="RowDetailsInRadWindow.MainPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
	mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" >
	<Border Name="LayoutRoot" Padding="2">
		<StackPanel>
			<StackPanel.Resources>
				<DataTemplate x:Key="RowDetailsTemplate">
					<Border Padding="2">
						<StackPanel>
							<telerik:RadGridView Name="playersGrid" 
											 ItemsSource="{Binding Players}"
											 AutoGenerateColumns="False"
											 ColumnsWidthMode="Fill"
											 Width="220"
											 Margin="2"
											 IsFilteringAllowed="False"
											 ShowGroupPanel="False"
											 CanUserFreezeColumns="False"
											 CanUserReorderColumns="False"
											 CanUserResizeColumns="False"
											 RowIndicatorVisibility="Collapsed"
											 HorizontalAlignment="Left"
											 VerticalAlignment="Top">
								<telerik:RadGridView.Columns>
									<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
									<telerik:GridViewDataColumn DataMemberBinding="{Binding Number}"/>
								</telerik:RadGridView.Columns>
							</telerik:RadGridView>
						</StackPanel>
					</Border>
				</DataTemplate>
			</StackPanel.Resources>
			<TextBlock Margin="2">Select rows to see their details. Move the window if you wish.</TextBlock>
			<telerik:RadGridView Name="clubsGrid" 
								 Margin="2"
								 ItemsSource="{Binding Clubs}"
								 RowDetailsVisibilityMode="Collapsed"
								 RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
								 AutoGenerateColumns="False"
								 ColumnsWidthMode="Fill"
								 Width="220"
								 IsFilteringAllowed="False"
								 ShowGroupPanel="False"
								 CanUserFreezeColumns="False"
								 CanUserReorderColumns="False"
								 CanUserResizeColumns="False"
								 RowIndicatorVisibility="Collapsed"
								 HorizontalAlignment="Left"
								 VerticalAlignment="Top">
				<telerik:RadGridView.Columns>
					<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
					<telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
											DataFormatString="{}{0:yyyy}"/>
				</telerik:RadGridView.Columns>
			</telerik:RadGridView>
		</StackPanel>
	</Border>
</UserControl>
