I made a function like this:
public DataTable getMtrBcdMod()
{
DataSet ds = new DataSet();
string query = "select pMtrBcdMod, sMtrBcdMod from dtMtrBcdMod ";
SqlCommand cmd = new SqlCommand(query, DatabaseConnection);
SqlDataAdapter dap = new SqlDataAdapter();
dap.SelectCommand = cmd;
dap.Fill(ds);
return ds.Tables[0];
}
and I wish designtime, editing a datagridview, add a DataGridViewComboBoxColumn that points at the datasource the DataTable returned by the function, using ValueMember pMtrBcdMod and sMtrBcdMod as DisplayMember..
how can I do this?
thanks