on 10-04-2010 2:59 PM
Hi,
In my application I have used RadioButtonGroupByIndex selection.By default I am provided with 3 radio buttons,But I require only 2 radio buttons.How do I reduce the number of RadioButtons.If I give on the texts tab on the properties table I am given a context from where I select the attribute.But I need to add the property for the radio and not for the text to which the radio is attached,How do i add the text and assign the property of the radio to the context.Do I have to create a RadioButton rather than a RadioButtonGroupByIndex,If so then If i make a selection in one radiobutton I need the other radio button also to be inactive ie only one selection.Is this possible if i just create a radiobutton rather than a RadioButtonGroupByIndex.
Hi give the code for populating the radiobuttongroupbyindex in the method list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello,
Please have a look into this link.
http://help.sap.com/erp2005_ehp_04/helpdata/en/d7/f08841e3af1609e10000000a155106/frameset.htm.
It has all information on radio buttons.
Best regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for your help,but it seems that the link provides me with an overview of what a RadioButtonGroupByIndex and radiobutton is.
I am not able to find a solution of which one to use,and how it is being used.
If using RadioButtonGroupByIndex action ,how do i reduce the size from the default 3 to 2 and if i am using the radiobutton, how do i assign the values.I have created a transparent container,but unable to continue from there and in a radiobutton by default both my options are selected,how do i select only one.
Hi ,
When you use RadiobuttonByindex , by default you get 3 buttons in the view overview.This doesnt mean that they will appear on the view when you run the application.
To make a radiobutton appear , you will have to add elements to the context bound to the UI element.
Use a supply function or in the WDDOINIT() method , fill the context with as many elements as needed (number of elements = number of buttons).
Also you can have a look at WDR_TEST_EVENTS component.
Thanks,
aditya.
Hi ,
As i posted before , you will have to populate the context which has the attribute that is bound to the "text" of radiobuttonByIndex.
A sample code below.Here you can see , texts being set to the elements and finally all elements (3 in this case) are then bound to the context. This will create 3 buttons on screen with texts , "Radiobutton 1" , "Radiobutton 2" , "Radiobutton 3"..
This kind of logic has to be written in Supply function or WDDOINIT().
data:
lt_attributes type standard table of if_radiobtngrpbyidx=>element_rbtngrp1,
wa_attributes like line of lt_attributes.
wa_attributes-texts = 'Radiobutton 1'.
insert wa_attributes into table lt_attributes.
wa_attributes-texts = 'Radiobutton 2'.
insert wa_attributes into table lt_attributes.
wa_attributes-texts = 'Radiobutton 3'.
insert wa_attributes into table lt_attributes.
node->bind_elements( lt_attributes ).
Thanks,
aditya.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.