using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using Telerik.Windows.Controls.GridView;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

            DataContext = new MyDataContext();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            RadGridView1.BeginInsert();
        }
    }

    public class MyDataContext
    {
        ObservableCollection<MyObject> _Data;
        public ObservableCollection<MyObject> Data
        {
            get
            {
                if (_Data == null)
                {
                    _Data = new ObservableCollection<MyObject>(
                        from i in Enumerable.Range(0, 10)
                        select new MyObject()
                        {
                            Property1 = String.Format("Property1{0}", i),
                            Property2 = String.Format("Property2{0}", i),
                            Property3 = String.Format("Property3{0}", i),
                            Property4 = String.Format("Property4{0}", i),
                            Property5 = String.Format("Property5{0}", i)
                        });
                }
                return _Data;
            }
        }
    }

    public class MyObject
    {
        public string Property1 { get; set; }
        public string Property2 { get; set; }
        public string Property3 { get; set; }
        public string Property4 { get; set; }
        public string Property5 { get; set; }
    }
}
