You can set the DropDown cell type using the GridTableCellStyleInfo.
Please refer the following codes for further reference.
GridTableCellStyleInfo ggcStyle =
gridGroupingControl1.TableDescriptor.Columns["Customers"].Appearance.AnyRecordFieldCell;
ggcStyle.CellType = "ComboBox";
ggcStyle.DataSource = this.GetTheComboTable;
ggcStyle.ValueMember = "CustomerID";
ggcStyle.DisplayMember = "CustomerName";
// data source.
private DataTable
GetTheComboTable()
{
DataTable
dt = new DataTable("Customers");
dt.Columns.Add(new DataColumn("CustomerID", typeof(int)));
dt.Columns.Add(new DataColumn("CustomerName"));
dt.Rows.Add(new object[] { 5, "William Wordsworth" });
dt.Rows.Add(new object[] { 3, "Mark Twain" });
dt.Rows.Add(new object[] { 2, "James Dickey" });
dt.Rows.Add(new object[] { 4, "Emiley Dickinson" });
dt.Rows.Add(new object[] { 1, "William Bronk" });
return
dt;
}
Please use this codes in your
application if you have further concerns please let me know we will provide
the solution.
|