on ‎2005 Jan 21 4:58 PM
Hi,
I am having scenario to put 3 radio buttons (for 3 columns as group) in table view using table view iterator.
How can I create a radio button like input field in iterator through CL_HTMLB_RADIOBUTTON class.
Can anybody please give me solution how to do it.
Thanks in advance
Srinivas S
Request clarification before answering.
Hi Thanks for your inputs.
Here I clubed both of your solutions.
method if_htmlb_tableview_iterator~render_cell_start.
data: rbg type ref to cl_htmlb_radiobuttongroup,
rb type ref to cl_htmlb_radiobutton,
rad_gp TYPE REF TO cl_bsp_bee_table.
check p_column_key = 'FMODE'.
create object rad_gp.
rbg = cl_htmlb_radiobuttongroup=>factory(
id = p_cell_id columncount = '2' ).
rad_gp->add( element = rbg level = 1 ).
rb ?= cl_htmlb_radiobutton=>factory( id = '1' text = 'One' ).
rad_gp->add( element = rb level = 2 ).
rb ?= cl_htmlb_radiobutton=>factory( id = '2' text = 'Two' ).
rad_gp->add( element = rb level = 2 ).
p_replacement_bee ?= rad_gp.
endmethod.
Thanks for your great help
Srinivas S
-
Message was edited by: Brian McKellar
Reformatted source, and changed sequence so that create object is after check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, of course, once all radio buttons are in one column, things are much easier, the source more elegant and better to manage.
One final comment: all factory methods contain both an ID and ID_POSTFIX parameters. So in cases where we have sub controls, like radio buttons in a radio button group, I like to use the following code:
rbg = cl_htmlb_radiobuttongroup=>factory(
id = p_cell_id columncount = '2' ).
rb ?= cl_htmlb_radiobutton=>factory(
id = p_cell_id id_postfix = '1' text = 'One' ).
rb ?= cl_htmlb_radiobutton=>factory(
id = p_cell_id id_postfix = '2' text = 'Two' ).
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.