cancel
Showing results for 
Search instead for 
Did you mean: 

Help in Check box group

Former Member
0 Kudos

Hi,

I have created a check box Group

texts = Mydata.Interest.Interests

Mydata is a node , Interests is of type Simple type Interests.

It has 3 enumerations.

But when i run, I am able to only one check box with out any text.

Where am i wrong?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

But when i run, I am able to only one check box because

The number of checkboxes equals the number of node elements.

and A CheckBoxGroup cannot be bound against a value set of a Simple Value type.

Regards

Trilochan

Former Member
0 Kudos

no, i have taken only one node attribute of type INTEREST.

INTEREST is simple type i have created which has 3 enumerations.

If i take three attributes of type string , how can i assign texts to the check box group?

Former Member
0 Kudos

hi,

if u r using string type attribute then use this code in init method

here abc is attribute name and ad is node name.

for (int i = 0; i < 5; ++i)

{

IPrivateCreateXmlView.IAdElement ele = wdContext.nodeAd().createAdElement();

wdContext.nodeAd().addElement(ele);

ele.setAbc("Name " + i);

}

Regards

Trilochan

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

A CheckBoxGroup cannot be bound against a value set of a DDIC type.

Refer this thread

Regards

Ayyapparaj

Former Member
0 Kudos

Hi you cannot use symple type to name the check boxes.

create a node(Say CheckBox) of cardinality 0..N

with a context variable(Say CheckValue) of type String. Bind this attribute(CheckValue) to "texts" property of CheckBoxGroup.

Now, to add 5 checkboxes from code, use the following code

IPrivate<View>.ICheckBoxNode lNode=wdContext.nodeCheckBox();

IPrivate<View>.ICheckBoxElement lEl;

for(int i=0;i<5;i++)

{

lEl=lNode.createCheckBoxElement();

lNode.addElement(lEl);

lEl.setCheckValue("Text"(i1));

}

xxxxxxxxxxxxxxxxxxxx

Edited by: Armin Reichert on May 21, 2008 7:58 PM

Former Member
0 Kudos

First of all check if the node attached to cbg is set to cardinality 1..1.

If not, check if there is an element in this node (at runtime) and if it's the lead selection.

Did you bind the attribute to the "Texts" property of the cbg?

Is there any chance that you change the attribute value at runtime?

Aviad