using System.Linq;
using System.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Controls;

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

            DataContext = new MyDataContext();
        }

		private void RadGridView_DataLoaded(object sender, System.EventArgs e)
		{
			var grid = (RadGridView)sender;

			if (!grid.GroupDescriptors.Any())
			{
				var column = grid.Columns["Country"];

				column.ShowColumnWhenGrouped = false;
				grid.GroupDescriptors.Add(new ColumnGroupDescriptor() { Column = column });
			}
		}
    }
}
