using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.Windows.Controls;

namespace WpfApp0
{
    public class GridViewModel : ViewModelBase
    {
        public string Name { get; set; }

        private ComboModel comboItem;
        public ComboModel ComboItem
        { 
            get => comboItem;
            set
            {
                comboItem = value;
                OnPropertyChanged("ComboItem");
            }
        }
    }

    public class ComboModel
    {
        public string Id { get; set; }
        public string Value { get; set; }
    }


    public class ViewModel : ViewModelBase
    {
        public ObservableCollection<GridViewModel> GridView { get; set; }
        public ObservableCollection<ComboModel> ComboItems { get; set; }

        public ViewModel()
        {
            ComboItems = new ObservableCollection<ComboModel>
            { 
                new ComboModel { Id = "1", Value = "One" }, 
                new ComboModel { Id = "2", Value = "Two" }, 
                new ComboModel { Id = "3", Value = "Three" }, 
                new ComboModel { Id = "4", Value = "Four" }, 
            };

            GridView = new ObservableCollection<GridViewModel>
            {
                new GridViewModel { Name = "A", ComboItem = ComboItems.FirstOrDefault() },
                new GridViewModel { Name = "B", ComboItem = ComboItems.LastOrDefault() },
                new GridViewModel { Name = "C", ComboItem = ComboItems.FirstOrDefault() },
            };
        }
    }
}
