SLOOOW Databinding

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.
 
S

Strider

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?).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top