cancel
Showing results for 
Search instead for 
Did you mean: 

check box group- to know which check box is selected.

Former Member
0 Kudos

Hi,

I have created a checkbox group element and I need to know which check box is selected based on which I need to make some columns in the table visible.

So, How can I do the need?

Any code will be useful.

With Regards

Tenzin

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I have got the answer using that index and set some attribute to x based on the index retrieved.

former_member402443
Contributor
0 Kudos

Hi Tenzin,

check the standard component - WDR_TEST_EVENTS for the check box group.

Within this component you will get your solution.

Regard

Manoj Kumar

arjun_thakur
Active Contributor
0 Kudos

Hi Tenzin,

Use the following code to get the index of the check box clicked.


data:
       index   type string.
index = wdevent->get_string( 'INDEX' ).

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Hi,

My doubt is multiple check boxes are checked.. then how will i get all the indexes....

Regards

Tenzin

Former Member
0 Kudos

Hi,

Best way to do this, by ID. (Checkbox ID)

Please check the properties of checkbox. Use f1 help also for checkbox help.

Best Regards

Ravi

Former Member
0 Kudos

Hi,

You can use use method GET_STATE .

I hope it will help You.

regards,

rohit

Former Member
0 Kudos

Hi,

Can you give me a demo code of how to use this code as I have no idea how to implement the method which you have give.

Thanks and Regards

Tenzin

Former Member
0 Kudos

hi,

Here, you can write the below code in the OnToggle of CheckBoxGroup.

->Create an Attribute Store in Component Controller of type String_table.

->Now in this Attribute (store) , you will be having all the indexes of CheckBox.

data:

index type string,

checked type string.

index = wdevent->get_string( 'INDEX' ).

checked = wdevent->get_string( 'CHECKED' ).

if checked = 'X'.

APPEND index to WD_COMP_CONTROLLER->store.

endif.

I hope it helps.

Thanx.