GridStyleInfo style = ((GridDataBoundGrid)e.Grid).GridBoundColumns["EmployeeID"].StyleInfo;
style.CellType = "ComboBox";
style.DataSource = this.dataSet11.Employees;
style.ValueMember = "EmployeeID";
style.DisplayMember = "LastName";
style.ExclusiveChoiceList = true;
If you want to create a list yourself, you can change this code like:
style.CellType = "ComboBox";
StringCollection sc = new StringCollection();
sc.Add("11");
sc.Add("22");
sc.Add("33");
style.DataSource = sc;
>GridStyleInfo style = ((GridDataBoundGrid)e.Grid).GridBoundColumns["EmployeeID"].StyleInfo;
>style.CellType = "ComboBox";
>style.DataSource = this.dataSet11.Employees;
>style.ValueMember = "EmployeeID";
>style.DisplayMember = "LastName";
>style.ExclusiveChoiceList = true;
>
>
>If you want to create a list yourself, you can change this code like:
>
>style.CellType = "ComboBox";
>StringCollection sc = new StringCollection();
>sc.Add("11");
>sc.Add("22");
>sc.Add("33");
>style.DataSource = sc;
>