Hi, below is my code, I have column: Condition in table of SQL server, I want when I press button1, the column Condition will be showed like combobox with Items list created in C#.
How Can I do?
private void button1_Click(object sender, EventArgs e)
String sql = "select * from Main";
SqlConnection c = new SqlConnection(ConnectionString);
adap = new SqlDataAdapter(sql, c);
SqlCommandBuilder cb = new SqlCommandBuilder(adap);
if (c.State == ConnectionState.Closed)
dt = new DataTable();
dataGridView1.DataSource = dt;
catch (Exception ex)
MessageBox.Show("Please select Date " + ex.Message);