System.Windows.Forms.BindingSource is a class in the C# language that provides a data source for a control that performs data binding. It facilitates updates to the data source and notifies the control of the changes.
Example 1:
BindingSource bindingSource1 = new BindingSource();
This creates a new instance of the BindingSource class and assigns it to the variable bindingSource1.
Example 2:
bindingSource1.DataSource = dataSet1;
This code sets the data source of the binding source to a data set named "dataSet1".
Example 3:
dataGridView1.DataSource = bindingSource1;
This code sets the data source of a DataGridView control named "dataGridView1" to the binding source, which displays the data from the data set.
This class is part of the System.Windows.Forms package library in C#.
C# (CSharp) System.Windows.Forms BindingSource - 60 examples found. These are the top rated real world C# (CSharp) examples of System.Windows.Forms.BindingSource extracted from open source projects. You can rate examples to help us improve the quality of examples.