I have a datagridview
that is bound to a dataset
via a table adaptor
which in turn linked to a SQL table.
I want to change the cell type of the status and priority columns to comboboxes.
I have tried this:
private void dgvFechas_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
{
try
{
if (e.Column.ValueType == typeof(TextBox) && (e.Column.Index == 5) || (e.Column.Index == 6))
{
e.Column.CellTemplate = new DataGridViewComboBoxCell();
}
}
catch (Exception ex) { }
}
but it doesnt seem like the event handler fires when the program starts up.
So im not too sure how i can get it to work.