using System;
using System.Linq;
using System.Windows;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;
using System.ComponentModel;
using System.Windows.Input;
namespace FirstTestGridViewWPF
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.radGridView1.ItemsSource = EmployeeService.GetEmployees(); 
        }

        

        private void radGridView1_BeginningEdit(object sender, Telerik.Windows.Controls.GridViewBeginningEditRoutedEventArgs e)
        {
            if (this.radGridView1.Items.CurrentAddItem == e.Row.Item)
            {
                e.Cancel = true;
               
            }
            this.radGridView1.CommitEdit();
            
        }

    }
    
}
