why are there two ways of setting bindings?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a dataset "Ds" and a datatable "Employees"

what are the differences between:
1. Datasource = Ds.Employees and Datamember = ""
2. Datasource = Ds and DataMember = "Employees"

and does it has any impact on the application?
 
It impacts the way you access the BindingManagerBase later on.

IIRC:
1. Datasource = Ds.Employees and Datamember = ""
BindingManagerBase[Ds.Employees] -- will get the correct BindingManager for
syntax #1
2. Datasource = Ds and DataMember = "Employees"
BindingManagerBase[ds,"Employees] -- will get the correct BindingManager for
syntax #2

This caused me all kinds of pain when I first started using DotNet. I
eventually gave up on DataBinding for anything that was read/write, now I
only use it on screens where I just need to display data.

Cole
 
Back
Top