ray dona

ray dona

  • NA
  • 29
  • 0

bind to control

Jan 24 2008 6:23 AM

Hi, I’m trying to bind a single value from a data source to the Text property of a label. I’ve done everything necessary, created DataSet, TableAdapter, BindingSource, etc. When I write the following code in the Page_Load event of form:

    this.TableAdapter.Fill(this.DataSet.Table);

 

program runs correctly. However, when I insert the following code:

 label.DataBindings.Add("Text",TableBindingSource,"column");

 

in Page_Load event I get error:

System.ArgumentException{“This causes two bindings in the collection to bind to the same property.\r\nParameter name: binding"}

Could anyone tell me what the error means and how to rectify it.

Answers (1)