on 04-13-2010 3:59 PM
Hi,
I have a dropdown attached to a node-attribute.
this attribute is binded with a dictionary-simple type and its having 3 values.
Now i want to remove only one value from this dropdown through coding.
how to do that ?
please help me
thks
John
Create a modifiable simple value set for the context attribute and populate it with the original value set except the value you want to remove.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John
Use the below code , through this you can modify the content of your simple type.
IWDAttributeInfo attr=wdContext.getNodeInfo().getAttribute(" Your Attribute name ");
// or IWDAttributeInfo attr=wdContext.getNodeInfo().getAttribute(" IPublicViewName.IContextElement.AttributeName");
ISimpleTypeModifiable stm=attr.getModifiableSimpleType();
IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();
svs.Removekey ( " Use the key you want to remove "); // check from your simpletype in dictionary.
Hope it helps.
Thanks
Puneet
Hi John,
Armin is correct. if you want to remove element from context attribute which is populated to Dictonary. Create another Simple Type in Dictanary with two element
OR Create another node in the context node and attribute and while filling data uisng I<Node Name>Element skip the element which you want to remove.
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am assuming you know the position in the drop down from where the value needs to be removed.
You can use :
wdContext.NodeVn_DropDown.removeElementAt(i);
OR
wdContext.NodeVn_DropDown.removeElement(wdContext.nodeVn_DropDown.getVn_DropDownElementAt(i);
Regards,
Himanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.