using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls.UI;

namespace _535947ComboColAutoComplete
{
    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
        }

        private void RadForm1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'nwindDataSet.Products' table. You can move, or remove it, as needed.
            this.productsTableAdapter.Fill(this.nwindDataSet.Products);

            GridViewComboBoxColumn comboCol = new GridViewComboBoxColumn("ComboCol");
            comboCol.DataSource = this.productsBindingSource;
            comboCol.ValueMember = "ProductID";
            comboCol.DisplayMember = "ProductName";
            comboCol.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
            comboCol.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            this.radGridView1.Columns.Add(comboCol);

            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

            for (int i = 1; i <= 5; i++)
            {
                this.radGridView1.Rows.Add(i);
            }
        }
    }
}