Hello,
I load data from a database into a dataGridView. How can I set one of the columns to combobox that loads data from a stored procedure?
Here's my code for loading data:
using (conn = new SqlConnection(connectionString))
{
SqlCommand cmd = new SqlCommand("SELECT_TASKS", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@UserID", System.Environment.UserName));
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
tasksGridView.DataSource = dt;
}
conn.Close();
Thank you in advance.

Anurag SarkarRank #1,049 · 1.8K reputationPosted Apr 17, 2014, 1:13 AM EDT
DealyRank #9,518 · 205 reputationPosted Apr 17, 2014, 1:52 AM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted Apr 17, 2014, 3:44 AM EDT
http://www.mindstick.com/Articles/6ad5e5a1-7802-403c-a85f-99296208b9ac/?ComboBox%20in%20DataGridView%20in%20C
DealyRank #9,518 · 205 reputationPosted Apr 17, 2014, 8:06 AM EDT