<UserControl x:Class="RadDataFormAndRadGridViewIntegration.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="http://schemas.telerik.com/2008/xaml/presentation"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <Grid x:Name="LayoutRoot" Height="200" VerticalAlignment="Center" HorizontalAlignment="Center" Background="White">
        <telerik:RadGridView x:Name="RadGridView1" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn>
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <Button Content="Edit" x:Name="Edit" Click="Edit_Click" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        <telerik:RadDataForm CurrentItem="{Binding CurrentItem,ElementName=RadGridView1}" Visibility="Collapsed" Header="Edit Person"  CommandButtonsVisibility="Commit,Cancel"  Width="200" Height="150" x:Name="RadDataForm1" />
    </Grid>
</UserControl>
