on 10-16-2008 12:55 PM
hi
i have a tableview
how can i take the value that clicked a row of table view ?
Hi Mutlu,
Plesase chck this code.
DATA: event TYPE REF TO CL_HTMLB_EVENT,
tv_data type ref to CL_HTMLB_EVENT_TABLEVIEW.
if event->id = 'tv1'.
tv ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'tableView'
id = 'tv1' ).
if tv is not initial.
*the selected row value is in tv_data.
tv_data = tv->data.
v_index = tv_data->row_index.
endif.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try with the below logic represented below.
Have a column in the table view for, whether the row selected or not (eg. Include_exclude).
Use the below piece of code.
In IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START,
m_row_ref ?= p_row_data_ref.
In IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
DATA: CHK TYPE ZFLAG.
case p_column_key.
when 'INCLUDE_EXCLUDE'.
CHK = m_row_ref->INCLUDE_EXCLUDE.
p_replacement_bee = CL_HTMLB_CHECKBOX=>FACTORY(
id = p_cell_id
checked = CHK ).
In Do Request
Data: loc_table_event type ref to cl_htmlb_event_tableview.
Data: Selected type i.
call method cl_hrrcf_iterator=>get_tv_attr
exporting
p_tv_id = '<Table View ID>'
p_component_id = me->component_id
po_request = me->request
importing
po_tv_event = loc_table_event.
Selected = loc_table_event->get_cell_value(
row_index = indv
column_index = 1 ).
Reward points if helpful.
Regards,
Gokul.N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
did you check this application SBSPEXT_TABLE
in that check the Page TableViewClient.bsp
and also use search option. there are many threads available on the same topic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
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.