cancel
Showing results for 
Search instead for 
Did you mean: 

Dryanamic RadioButtonGroupbyindex

Former Member
0 Kudos

Hai all,

I have some problems in dynamic creation of RadioButtonGroupbyIndex and DropdownbyIndex. I have create seperate node for both Element and bind to it. It sucessfully load the values from the database and displayed.

My problem is, Suppose i want to set some value as defalut while loading the RadioButtonGroupbyIndex and DropdownbyIndex. How it possible?. That means i have to set some values as defalut selection in both cases. It is fully on the dynamic.

In my dropdown one empty value is displayed. How to remove from the dropdown?

Thanks in Advance,

S.Mukesh Mani.

Accepted Solutions (1)

Accepted Solutions (1)

Yashpal
Active Contributor
0 Kudos

Hi Mukesh,

To remove the empty value from dropdown set the selection property of context node which is binded to dropdown to 1...1 for simgle selection aor 1.....n for multiple selection.....and for setting the default values if u r copying the datafrom model nodes to value nodes than u can add the data using the createELement() of node element and then set the data u want and bind it to the node .....

Regards,

Yash

Former Member
0 Kudos

Hi Yash,

Thanks for your reply. I want to delete the blank line from the dropdown which is created dynamic. I have the node like following.

IWDNode node1 = wdContext.nodeNodeA().getChildNode("NodeA", IWDNode.LEAD_SELECTION);

Here i have the node object like node1. I tried the following methods..

node1.setSelected(0,false); or

node1.setSelected(0,true); or

node1.setSelected(1,false); or

node1.setSelected(1,true); or

node1.setLeadSelection(0); or

node1.setLeadSelection(1); or

node1.setLeadSelection(-1); or

In some methods i got errors. Can you tell me which method i have to use to remove blank row from the dropdown.

Regards,

S.Saravanan.

Former Member
0 Kudos

While you create your node give the mandatory selection as true.

Use node.setLeadSelection();

wdContext.getNodeInfo().addChild("NodeA",null,true,false,true,<b>true</b>,false,true,null,null,null)

Noufal

Answers (1)

Answers (1)

Former Member
0 Kudos

Please check this.

Regards, Anilkumar