D
dan
Hi,
I have a form that displays record fields. The record has a 'type' field.
I'd like to use different controls for one of the fields based on the type.
I initially thought of putting all possible controls (e.g. single line text
box, multiline text box, check box, etc.) on the form and bind their
'Visible' attributes to expression like "GetType() == SomeType". The
code-behind takes care of 'remembering' the current type.
As a result only one of the controls will be shown for the field.
Unfortunately this solution does not work reliably. It seems that the form
view transfers values from controls to fields regardless of their
visibility.
Could someone please recommend another solution? I have about 20 fields on
the form and only one of them needs to have a different UI based on the
type.
Thanks,
Dan
I have a form that displays record fields. The record has a 'type' field.
I'd like to use different controls for one of the fields based on the type.
I initially thought of putting all possible controls (e.g. single line text
box, multiline text box, check box, etc.) on the form and bind their
'Visible' attributes to expression like "GetType() == SomeType". The
code-behind takes care of 'remembering' the current type.
As a result only one of the controls will be shown for the field.
Unfortunately this solution does not work reliably. It seems that the form
view transfers values from controls to fields regardless of their
visibility.
Could someone please recommend another solution? I have about 20 fields on
the form and only one of them needs to have a different UI based on the
type.
Thanks,
Dan