using System.Linq;
using System.Windows;
using Telerik.Windows.Data;
using System.Collections.ObjectModel;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        ObservableCollection<Order_Detail> source = new ObservableCollection<Order_Detail>();
        VirtualQueryableCollectionView vqcv;

        public MainWindow()
        {
            InitializeComponent();

            var context = new NorthwindEntities();
            var query = context.Order_Details.OrderBy(o => o.OrderID);

            var view = new VirtualQueryableCollectionView(query) { LoadSize = 10, VirtualItemCount = 200 };

            DataContext = view;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.radGridView.SelectedItems.Clear();
        }
    }
}
