Dataset with binding syntax??

  • Thread starter Thread starter al
  • Start date Start date
A

al

Greetings,

What is the diference between the two:

textbox.databinds.add("text",ds.Tables("Employees"),"empid")
textbox.databinds.add("text",ds,"Employees.empid")

MTIA,
Grawsha
 
Hi,

I think that two different bindingmanagerbase are created.
Data is bound in the same way, though.
 
I believe they are the same. The first field is simply the property that
you want to bind to. The next field needs to be something that implements
IBindingList, ITypedList or IList. In both of your examples, that condition
is met. A datatable and a Dataset both meet this. The third argument is the
navigation path. Both get you to the same place....if you already know the
table, then the column name serves as the navigation path. If you only know
the dataset in the second param, you need to specify a more precise
navigation path, in this case, Table.Column.

HTH,

Bill
 
Back
Top