using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;
using Telerik.Windows.Controls.GridView;

namespace RadGridView_SL4_AR_3
{
	public partial class MainPage : UserControl
	{
		public MainPage()
		{
			InitializeComponent();
		}

		private void Button1_Click(object sender, RoutedEventArgs e)
		{

		}

		private void Button2_Click(object sender, RoutedEventArgs e)
		{

		}

		private void CheckBox_Click(object sender, RoutedEventArgs e)
		{
			CheckBox chk = (CheckBox) sender;
			var row = chk.ParentOfType<GridViewRow>();

			if (row != null)
			{
				Club club = row.DataContext as Club;
				MessageBox.Show("Index is: " + clubsGrid.Items.IndexOf(club));
			}
		}
	}
}
