SLOOOW Databinding

  • Thread starter Thread starter Strider
  • Start date Start date
S

Strider

Has anyone noticed that data binding in
..NET CF is incredibly SLOW.

For example, I have a Customer class with 6
string properties.

I also have a Windows form with 6 text boxes

The hole process of binding an instance of the Customer
class to the Textbox controls on the form takes more than
2 seconds (!!).

The binding is done like this:

this.txtFirstName.DataBindings.Add("Text",
oCustomer, "FirstName");

Is there a faster way to bind a form's controls to an
object's properties?

Thanx.
 
In my benchmark, the data source is a class (Customer)
that has 6 public properties. I bind the
textboxes with each of the Customer object's
properties. The code looks like this:

this.txtFirstName.DataBindings.Add("Text",
oCustomer, "FirstName");

.... where oCustomer is an instance of the Customer class.

I have noticed that any operation involving Reflection
is very slow in the CF (Reflection is being used
internally when data bindng, right?).
 
Back
Top