Binding forms?

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

al

Hi,

Do I have to release binding of form controls to dataset every time I
do form search of filling?I mean, is there a shorter way than this?

'Binde textbox1 to dataset

textbox1.databindings.add("text",ds,"Employees.firstname")


'unbinde for ReUse of binding prpty. Loop through all controls that
were bound.

textbox1.databindings.clear



MTIA,
Grawsha
 
Grawsha:

It depends on how you do it. If you are going to filter heavily, you may
want to bind to a dataview b/c as soon as you change the filter, everything
will change accordingly but if you take the rowfilter off then all your
records are displayed again. Also, a lot has to do with your relations and
if you are using a lot of Complex binding (like with a Combo box and all).
Even then, you don't have to rebind although you certainly can if you want
to. Also, if you sync with your database whenever you make a change (not
necessarily a good strategy but it depends on your needs) then your local
data and server data can be kept totally in sync. Make sure that if
somethign fails with an update that you failover to an XML file or something
so that you can get the changes later and update your datasource.

HTH,

Bill
 
William Ryan said:
Grawsha:

It depends on how you do it. If you are going to filter heavily, you may
want to bind to a dataview b/c as soon as you change the filter, everything
will change accordingly but if you take the rowfilter off then all your
records are displayed again. Also, a lot has to do with your relations and
if you are using a lot of Complex binding (like with a Combo box and all).
Even then, you don't have to rebind although you certainly can if you want
to. Also, if you sync with your database whenever you make a change (not
necessarily a good strategy but it depends on your needs) then your local
data and server data can be kept totally in sync. Make sure that if
somethign fails with an update that you failover to an XML file or something
so that you can get the changes later and update your datasource.

HTH,

Bill


Ryan,

What is the best method to do binding? Databinding property in
controls or through creating binding object and use it accordingly.

MTIA,
Grawsha
 
Back
Top