Skip to Content

Deselect a row in a different tableview

Hi,

I have two tableviews in the same view (using MVC). Both tableviews are set with SINGLE select.

What I would like to achieve is to deselect the selected row in table1 when a row is selected in table2 (and the other way round), so that no more than one row is selected at any time over the two tables.

In the DO_HANDLE_EVENT of my controller I'm doing the following:

DATA: tv TYPE REF TO cl_htmlb_tableview.

DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.

tv ?= cl_htmlb_manager=>get_data(

request = runtime->server->request

name = 'tableView'

id = 'table1' ).

IF tv IS NOT INITIAL.

tv_data = tv->data.

cl_htmlb_manager=>check_tableview_all_rows(

rowcount = tv_data->rowcount

request = request

id = 'table1'

keytable = tv_data->prevselectedrowkeytable

check = '' ).

ENDIF.

But this does not work: it deselects ALL rows in both tableviews (even the one I want to keep selected).

Please advise.

Many thanks,

Christian

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 11, 2005 at 07:22 AM

    Up, please...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      For This you need to handle the <b>Onrowselection</b> event.

      Let the Table ID's of Two Table be TV1 And TV2.

      And The Tables to store SelectedRowIndexTable be SelectedRowIndexTable1

      SelectedRowIndexTable2

      Now OnRowSlection of TV1 Clear The SelectedRowIndexTable2

      and Set The First Index Of The table equal to zero.

      OnRowSlection of TV2 Clear The SelectedRowIndexTable2

      and Set The First Index Of The table equal to zero.

      I Have not used this in MVC but I have Used in BSP Pages Using Flow Logic And It is Working Fine There....

      <b>But Do Remember To Send a server event for onrowselection while defining the table tag.</b>

      If it does not answers your query , do revert back...

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.