J
J055
Hi
I have a rather odd problem when using my custom control in a FormView
control. The custom control inherits the CompositeControl. It is two
DropDownLists. The first DDL binds to a DataSource internally. When a user
selects a value in the first DDL a second DDL is bound to another
DataSource, again internally, based on the selected value of the first DDL.
This all works well until I place the control in a FormView control. On
first page request the custom control is loaded with the first DDL populated
with data but the list contains the values twice, i.e.
Value1
Value2
Value3
Value1
Value2
Value3
This does not happen when the control is used without the FormView. I have
tried debugging by adding a break point to where the first DDL is data bound
and the method only appears to be called once and contains the correct
values. Can someone suggest what might be happening and how I can fix it? It
would be a real pain if I couldn't use the FormView.
Many thanks
Andrew
I have a rather odd problem when using my custom control in a FormView
control. The custom control inherits the CompositeControl. It is two
DropDownLists. The first DDL binds to a DataSource internally. When a user
selects a value in the first DDL a second DDL is bound to another
DataSource, again internally, based on the selected value of the first DDL.
This all works well until I place the control in a FormView control. On
first page request the custom control is loaded with the first DDL populated
with data but the list contains the values twice, i.e.
Value1
Value2
Value3
Value1
Value2
Value3
This does not happen when the control is used without the FormView. I have
tried debugging by adding a break point to where the first DDL is data bound
and the method only appears to be called once and contains the correct
values. Can someone suggest what might be happening and how I can fix it? It
would be a real pain if I couldn't use the FormView.
Many thanks
Andrew