M
Mauro D.
Hi,
In my usercontrol I bind the BindingSource I pass via property to all
the control inside the usercontrol.
For example
Control ctl=new TextBox();
ctl.DataBindings.Add("Text", binding, prop, false,
DataSourceUpdateMode.OnPropertyChanged);
via ANTS Profiler I see that it takes so much time and the UI seems
freeze (I have at least 10 controls to bind)
The behaviour slow down if I bind a combobox...
cmb.ValueMember = "Id";
cmb.DisplayMember = "Etichetta";
cmb.DataSource = binding;
cmb.DataBindings.Add("SelectedItem", binding, prop, true,
DataSourceUpdateMode.OnValidation, null);
at least 0,7 seconds for each control.
What is wrong? How can I speed up the binding task?
Thanks
Mauro
In my usercontrol I bind the BindingSource I pass via property to all
the control inside the usercontrol.
For example
Control ctl=new TextBox();
ctl.DataBindings.Add("Text", binding, prop, false,
DataSourceUpdateMode.OnPropertyChanged);
via ANTS Profiler I see that it takes so much time and the UI seems
freeze (I have at least 10 controls to bind)
The behaviour slow down if I bind a combobox...
cmb.ValueMember = "Id";
cmb.DisplayMember = "Etichetta";
cmb.DataSource = binding;
cmb.DataBindings.Add("SelectedItem", binding, prop, true,
DataSourceUpdateMode.OnValidation, null);
at least 0,7 seconds for each control.
What is wrong? How can I speed up the binding task?
Thanks
Mauro