cancel
Showing results for 
Search instead for 
Did you mean: 

tableView: clear selection

daniel_humberg
Contributor
0 Kudos

I just tried to clear the current selection of a htmlb:tableView. the selectionMode is "MULTISELECT".

I tried this:


  DATA lr_table_view TYPE  REF TO cl_htmlb_tableview.

* get ref to tableView
  lr_table_view ?= cl_htmlb_manager=>get_data( request = request
                                               name    = 'tableview'
                                               id      = 'myid' ).

* before this, prevselectedrowindextable contains 4 entries.
  CLEAR lr_table_view->data->prevselectedrowindextable.
* after this, prevselectedrowindextable is empty, but on the view, still the selection is shown

but this does not seem to have any effect.

Thx for any suggestions.

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you use the following method to select/deselect all rows.

cl_htmlb_manager=>check_tableview_all_rows( rowcount = n

request = request

id = '<TV id>'

keytable = keytable

<b>check = '' ).</b>

CHECK = 'X' TO select all rows

check = ' ' to delselect all rows.

Regards

Raja

shiva_suvarna
Participant
0 Kudos

hi daniel

yes It wont effect because every time new instance of tableview( cl_htmlb_tableview ) will be created so that's why what ever the changes we made to the previous instance will not take effect.

one way to your problem is in the <b>selectedRowIndexTable</b> attribute should be specify with a value of type 'INT4_TABLE'.

and you have to fill that table according to your needs.

i hope this will help you

daniel_humberg
Contributor
0 Kudos

Thanks a lot. It works.


cl_htmlb_manager=>check_tableview_all_rows
  EXPORTING
    rowcount = 0 "can be anything in design2003
    "for design2002, we need to set rowcount = lines to be (de)selected
    "and keytable = a table of line keys
    request  = request
    id       = lv_id
    check    = space.

Answers (0)