A
Arturo Buonanni
Hello,
I've a question about how to access FormView template controls.
I've some dropdownlist controls in the EditItem template of a FormView
control. These dropdownlist controls are populated by database table
and the dropdownlist's SelectedValue property is bound to fields in
another table. These fields may be null.
Now, when the EditItem template is used with a record that has null
values in the field bound to the dropdownlist's SelectedValue property
an error is raised cause the dropdownlist doesn't have a value for the
"null" field to be selected.
As for what I know there are two way to address this issue: add a
record with the null value on the tables that populates the
dropdownlists or programmatically add an empty item to the
dropdownlists.
I would prefer the second option (I don't like null values in table
key fields) but I can't find the event that gives me access to the
FormView's EditItem template controls so to add the empty items before
the dropdownlist controls are bound to their fields.
Is there a way to do that?
Thanks for your help.
I've a question about how to access FormView template controls.
I've some dropdownlist controls in the EditItem template of a FormView
control. These dropdownlist controls are populated by database table
and the dropdownlist's SelectedValue property is bound to fields in
another table. These fields may be null.
Now, when the EditItem template is used with a record that has null
values in the field bound to the dropdownlist's SelectedValue property
an error is raised cause the dropdownlist doesn't have a value for the
"null" field to be selected.
As for what I know there are two way to address this issue: add a
record with the null value on the tables that populates the
dropdownlists or programmatically add an empty item to the
dropdownlists.
I would prefer the second option (I don't like null values in table
key fields) but I can't find the event that gives me access to the
FormView's EditItem template controls so to add the empty items before
the dropdownlist controls are bound to their fields.
Is there a way to do that?
Thanks for your help.