Hello, In the designer I can set a DataGridViews column type from a textbox to a ComboBox. However if I do LATE binding I can not figure out how to do this.... for example if I have the code
DataTable table;
public Form1()
{
InitializeComponent();
DataTable table = GetTable();
dataGridView1.DataSource = table;
}
static DataTable GetTable()
{
//
// Here we create a DataTable with four columns.
//
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Columns.Add("Drug", typeof(string));
table.Columns.Add("Patient", typeof(string));
table.Columns.Add("Date", typeof(DateTime));
//
// Here we add five DataRows.
//
table.Rows.Add(25, "AKA", "Artic Kansas Assoc.", DateTime.Now);
table.Rows.Add(50, "AAF", "American Association", DateTime.Now);
table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
return table;
}
}
Then the datagridview will display all columns as textBox Columns.... I want to make one column a specific type (ie like a combobox column).