<Window x:Class="RadGridView_WPF_AR_20.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
		xmlns:my="clr-namespace:RadGridView_WPF_AR_20"
		Title="MainWindow" Height="700" Width="700">
	<Window.Resources>
		<my:MyViewModel x:Key="MyViewModel"/>
	</Window.Resources>
	<Grid DataContext="{StaticResource MyViewModel}">
		
		
		<telerik:RadGridView Height="Auto" Width="Auto" x:Name="RadGridViewBilling" RowLoaded="RadGridViewBilling_RowLoaded"
							 Margin="5 0 5 5" Visibility="Visible"  RowDetailsVisibilityMode="Collapsed" 
							 RowIndicatorVisibility="Collapsed" IsReadOnly="True" AutoGenerateColumns="False"
							 CanUserFreezeColumns="False"  ItemsSource="{Binding Clubs}"
							 CanUserResizeColumns="False" SelectionMode="Extended" ShowColumnFooters="True" >
			<telerik:RadGridView.RowStyle>
				<Style TargetType="telerik:GridViewRow">
					<Setter Property="MinHeight" Value="40"/>
				</Style>
			</telerik:RadGridView.RowStyle>
			<telerik:RadGridView.Columns>
				<telerik:GridViewSelectColumn />
				<telerik:GridViewToggleRowDetailsColumn />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" IsGroupable="False" IsFilterable="False"/>
				<telerik:GridViewDataColumn  DataMemberBinding="{Binding Established}" IsGroupable="False" IsFilterable="False" TextAlignment="Right" DataFormatString = "{}{0:c2}" />				
				<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" >
					<telerik:GridViewDataColumn.AggregateFunctions>
						<telerik:SumFunction ResultFormatString="{}{0:c2}" SourceField="StadiumCapacity"/>
					</telerik:GridViewDataColumn.AggregateFunctions>
				</telerik:GridViewDataColumn>
				
			</telerik:RadGridView.Columns>
			<telerik:RadGridView.RowDetailsTemplate>
				<DataTemplate>
					<telerik:RadTabControl  x:Name="RadTabControl1"  BackgroundVisibility="Collapsed"
											Margin="10" VerticalAlignment="Center" Background="Transparent">
						<telerik:RadTabItem Header="Transactions" DataContext="{Binding}" Height="24" Foreground="Black">
							<telerik:RadGridView Height="Auto" Width="Auto" x:Name="RadGridViewTransactions" 
												 ItemsSource="{Binding Players}" AutoGenerateColumns="False" 
												 CanUserFreezeColumns="False" BorderThickness="0" CanUserResizeColumns="False"
												 ShowGroupPanel="False" 
												 Margin="0">
								<telerik:RadGridView.Columns>
									<telerik:GridViewDataColumn  DataMemberBinding="{Binding Name}" IsGroupable="False" IsFilterable="False" />
									
								</telerik:RadGridView.Columns>
							</telerik:RadGridView>
						</telerik:RadTabItem>
					
					</telerik:RadTabControl>
				</DataTemplate>
			</telerik:RadGridView.RowDetailsTemplate>
		</telerik:RadGridView>
	
	</Grid>
</Window>
