How to bind multiple controls to a single field in a form view?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top