I want to wire a text box to a BindingSource. I tried this:
SqlDataAdapter da = new SqlDataAdapter("select col1, col2, from table1", conn);
DataSet dt = new DataSet();
da.Fill(dt);
bindingSource1.DataSource = dt;
textBox2.DataBindings.Add("Text", bindingSource1, "col1");
When I run it, it says this:
Cannot bind to the property or column col1 on the DataSource.
What am I doing wrong?
Try something like this: