P
Paul
Hello All,
I am teaching myself C#. The book I am using has the following example
using a BindingSource object. Here is the code.
NorthwindDataSetTableAdapters.ProductsTableAdapter productsTA = new
ProductsMaintenance.NorthwindDataSetTableAdapters.ProductsTableAdapter();
productsTA.Fill(northwindDataSet.Products);
BindingSource productsBS = new BindingSource(northwindDataSet,
"Products");
productsGrid.DataSource = productsBS;
This code works and I am not having now trouble understanding why it
works. What I don't understand is why I need a BindingSource object at
all. The following code seems to work just as well without using a
BindingSource object.
NorthwindDataSetTableAdapters.ProductsTableAdapter productsTA = new
ProductsMaintenance.NorthwindDataSetTableAdapters.ProductsTableAdapter();
productsTA.Fill(northwindDataSet.Products);
productsGrid.DataSource = northwindDataSet.Products;
Am I missing something? Perhaps these two blocks of code do not produce
exactly the same results.
Help is always apprecated. Thank you.
Paul
I am teaching myself C#. The book I am using has the following example
using a BindingSource object. Here is the code.
NorthwindDataSetTableAdapters.ProductsTableAdapter productsTA = new
ProductsMaintenance.NorthwindDataSetTableAdapters.ProductsTableAdapter();
productsTA.Fill(northwindDataSet.Products);
BindingSource productsBS = new BindingSource(northwindDataSet,
"Products");
productsGrid.DataSource = productsBS;
This code works and I am not having now trouble understanding why it
works. What I don't understand is why I need a BindingSource object at
all. The following code seems to work just as well without using a
BindingSource object.
NorthwindDataSetTableAdapters.ProductsTableAdapter productsTA = new
ProductsMaintenance.NorthwindDataSetTableAdapters.ProductsTableAdapter();
productsTA.Fill(northwindDataSet.Products);
productsGrid.DataSource = northwindDataSet.Products;
Am I missing something? Perhaps these two blocks of code do not produce
exactly the same results.
Help is always apprecated. Thank you.
Paul