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.Controls.GridView;
using System.Windows.Data;
using System.Collections;

namespace multiColumnCombo_SL
{
	public partial class MultiColumnCombo : UserControl
	{
		public MultiColumnCombo()
		{
			InitializeComponent();
			this.Loaded += new RoutedEventHandler(MultiColumnCombo_Loaded);
		}

		void MultiColumnCombo_Loaded(object sender, RoutedEventArgs e)
		{
			GridViewComboBoxColumn parentColumn = this.ParentOfType<GridViewCell>().Column as GridViewComboBoxColumn;

			this.RadCombo1.ItemsSource = parentColumn.ItemsSource;
			this.RadCombo1.SelectedValuePath = parentColumn.SelectedValueMemberPath;
			this.RadCombo1.SelectedValue = this.ParentOfType<GridViewCell>().Value;
		}
	}
}
