To commit changes to database, you have to specify InsertCommand, UpdateCommand and DeleteCommand of the adapter first.
May be helpful:
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/ms254937(v=vs.90).aspx
Also, you can use DataGridViewComboBoxColumn (Beware of the null values in your Colour column, though, it does not handle nulls well)
// choose from existng:
var data = (from a in Table.AsEnumerable()
select new ValueHolder
{
Name = a.Field<string>("Colour")
}).Distinct().OrderBy(p => p.Name).ToList();
// your own
var data = new List<ValueHolder>();
data.Add(new ValueHolder("Red"));
data.Add(new ValueHolder("Yellow"));
//..................
var column = new DataGridViewComboBoxColumn();
column.DataSource = data;
column.ValueMember = "Name";
column.DisplayMember = "Name";
dataGridView1.Columns.Add(column);
//------------------------------------------------------------
class ValueHolder
{
public string Name{get;set;}
public ValueHolder(string name)
{
this.Name = name;
}
// this part may not be necessary without nulls:
//public override bool Equals(object obj)
// {
// ValueHolder other = obj as ValueHolder;
// if (other.Name.Equals(this.Name)) return true;
// return false;
// }
// public override int GetHashCode()
// {
// return Name == null ? 0 : Name.GetHashCode();
// }
}
it probably can be done in a simpler way, though.