I'm trying to learn how to use WinForms databinding, but one thing that's confusing me is why you would "Add" a databinding rather then "Set" a databinding? For example consider the following code.
TextBox1.DataBindings.Add("Text", ds,"Customers.CustomerID")
As I understand it this line adds a databinding to TextBox1
that binds its Text
property to the CustomerID
fields in the Customers
table of the ds
DataSet
.
Yet to me the term "Add" implies that you can add multiple of something. Which confuses me in this example. Why would you have a textbox bound to multiple things? How could that even be possible? Can someone provide an example where multiple bindings make sense?