on 09-23-2008 3:59 PM
Hi experts,
Can anyone tell me how to enable/disable an element of a view by code?
Thanks!
Hi,
Create a calculated attribute of type boolean lets say "Enabled".
Bind this to the element's enabled property.
public boolean getEnabled(IPrivateA.IContextElement element)
{
//@@begin getEnabled
//TODO:Your Logic goes here.
return false;
//@@end
}
Regards,
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create a attribute of type boolean .
and which elements you want to disable at initial bind this boolean attribute with elements enable property.
the default value for boolean is false the elements are in disable mode by default.
so when ever you want to enable elements make this boolean attribte value as true.
if(<condition>){
wdContext.currentContextElement().setBooleanAttribute(true); // it makes elements enable.
}
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bind the element property "enabled" to a context attribute of type boolean and set it to false.
Edited by: Kai Mattern on Sep 23, 2008 5:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.