on 03-07-2013 3:00 PM
Hi,
As suggested the best way is bind the property Enabled with an attibute in the context.
But I think the easiest way to do it is bind the property Enabled directly with the same attribute you use for your check box. Create an action for event onToggle but is not necessary to put any code there... is only for trigger the event...
I prefer to use the property "Read Only" instead of "Enabled", looks better, you can do it binding the property "Read Only" with the inverse of the value of the attribute of your checkbox.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think there is some misunderstanding on my side. The way I understand it is that you want to bind variable "L_FLAG" to the checkbox value and to the checkbox "Enabled" property. Now, if you set the variable to ON by default the checkbox will be marked ON and the field will be enabled. When a user unchecks it, the checkbox will be marked OFF and the field will be disabled.
Now I get your point, but is not necessary to bind the variable L_FLAG to the property Enabled of the checkbox, you need to bind it with the property enabled of the INPUT FIELD.
Although as I said I prefer to use the property Read Only of the Input field with the inverse of the attribute bound with the checkbox. (L_FLAG in this case)
bind enable property of input field with attrbute of type wdy_boolean change this attribute value on event On_toggle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Linking to a wdy_boolean context variable is the best way to go as Jitendra suggested. However, I don't think OnToggle is appropriate. Once it is toggled off and the field is disabled, you can't toggle it again.
Changing the flag that enables or disables the checkbox can be done in the WdDoModifyView (or in the post- method of this method in case you are enhancing a standard WDA application).
So, you will have two flag variables: a flag that contains the actual value of the checkbox and a flag that contains whether the checkbox should be enabled/disabled.
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.