G
Guest
I have a DataSet with 4 tables and also it has relation for each table like
this:
Table1
- Table2
- Table3
-Table4
Each of this table is bounded to a ComboBox, when i select an item from the
first combo, the rest of the combos are filtered.
I click the menu option and My problem is that the form take more than 5
seconds to load, i don't my users will like that.
If i remove the DataSource from the Combo, the form is show in less than 2
seconds, i could live with that.
I Also realize that if i only bind to the first 2 comboboxes, the speed is
not affected, but when i bind the 3 combobox the form slow down.
What can i do to avoid this?
Why DataBinding in .NET is so slow, always when i show a form with
databinding takes more than a second to be show, in real applications this
doesn't have on normal forms.
If I unbind my controls my form is shown inmediately.
Didn't the Microsoft Developers test this?
I feel like .NET has slow down things talking about UI.
If i make a control to change its appereance like a flat textbox with a
border color, it is grayed when the form is loaded and the is drawn, this
things doesn't look good.
'This code is in the form_load event
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Pais"
Combo1.ValueMember = "tblPaises.Pais"
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Relation1.Departamento"
Combo1.ValueMember = "tblPaises.Relation1.Departamento"
'From this point on, the relation becomes slow when i set the display member.
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Relation1.Relation2.Ciudad"
Combo1.ValueMember = "tblPaises.Relation1.Relation2.Ciudad"
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Relation1.Relation2.Relation3.Ciudad"
Combo1.ValueMember = "tblPaises.Relation1.Relation2.Relation3.Ciudad"
The filtering is managed automatically by the DataRelations, i don't do
anything.
if i select an item in combo1, it automatically filter the values in the
other combos.
this:
Table1
- Table2
- Table3
-Table4
Each of this table is bounded to a ComboBox, when i select an item from the
first combo, the rest of the combos are filtered.
I click the menu option and My problem is that the form take more than 5
seconds to load, i don't my users will like that.
If i remove the DataSource from the Combo, the form is show in less than 2
seconds, i could live with that.
I Also realize that if i only bind to the first 2 comboboxes, the speed is
not affected, but when i bind the 3 combobox the form slow down.
What can i do to avoid this?
Why DataBinding in .NET is so slow, always when i show a form with
databinding takes more than a second to be show, in real applications this
doesn't have on normal forms.
If I unbind my controls my form is shown inmediately.
Didn't the Microsoft Developers test this?
I feel like .NET has slow down things talking about UI.
If i make a control to change its appereance like a flat textbox with a
border color, it is grayed when the form is loaded and the is drawn, this
things doesn't look good.
'This code is in the form_load event
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Pais"
Combo1.ValueMember = "tblPaises.Pais"
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Relation1.Departamento"
Combo1.ValueMember = "tblPaises.Relation1.Departamento"
'From this point on, the relation becomes slow when i set the display member.
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Relation1.Relation2.Ciudad"
Combo1.ValueMember = "tblPaises.Relation1.Relation2.Ciudad"
Combo1.DataSource = DataSet
Combo1.DisplayMember = "tblPaises.Relation1.Relation2.Relation3.Ciudad"
Combo1.ValueMember = "tblPaises.Relation1.Relation2.Relation3.Ciudad"
The filtering is managed automatically by the DataRelations, i don't do
anything.
if i select an item in combo1, it automatically filter the values in the
other combos.