Skip to Content
0
Jun 02, 2008 at 08:54 AM

Retrieving value of editable cell of tableview.

57 Views

Hi All,

I my BSP , i have a tableView with one cell editable.For fetching the value of this cell i am using the following code:

DATA:  tv                  TYPE REF TO CL_HTMLB_TABLEVIEW,
       tv_event          type ref to cl_htmlb_event_tableview ,
       event             TYPE REF TO if_htmlb_data.

event = cl_htmlb_manager=>get_event( request ).
IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableView.
  tv_event ?= event.

CASE event->event_server_name.
when 'MyEventRowSelection'.
tv ?= CL_HTMLB_MANAGER=>GET_DATA(
                        request      = runtime->server->request
                        name         = 'tableView'
                        id           = 'material' ).


tv_event = tv->data.
*IF tv_event->prevSELECTEDROWINDEX IS NOT INITIAL.

value = tv_event->GET_CELL_value( row_index    = tv_event->prevSELECTEDROWINDEX
                                  column_index = '4' ).

*endif.
endcase.
endif.

here i am facing two issues?

1) value of tv_event->prevselectedrowindex is always zero.

2)if i try using selectedrowindex or any other value even hardcode values for parameter row_index of get_cell_value, the variable VALUE is always empty.

Why cant we use any other value for this parameter?

Thanks,

Anubhav.