Skip to Content
author's profile photo Former Member
Former Member

Table View: Default Selected Line..

Hi All,

I have a table view in my application.

now my requirement is to make a line(first line) selected by default initially ( when the page is loaded ).

I tried the following code in the do_init( ) but didnt worked..

  • tv_head ?= cl_htmlb_manager=>get_data(

  • request = runtime->server->request

  • name = 'tableView'

  • id = 'headerlist' ).

  • IF tv_head IS NOT INITIAL.

  • tv_head_data = tv_head->data.

  • ENDIF.


  • tv_head_data->SELECTEDROWINDEX = 1.

Can Anyone Help ?..

Any suggestion / Hint really appreciated ( Points ).

Thanks, Sudeep..

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 07:45 AM

    <htmlb:tableView id = "TV_SERVER"

    headerVisible = "true"

    footerVisible = "true"

    design = "alternating"

    columnWrapping = "TRUE"

    fillUpEmptyRows = "TRUE"

    navigationMode = "BYLINE"

    visibleRowCount = "8"

    selectionMode = "LINEEDIT"

    filter = "SERVER"

    filterButtonText = "Filter"

    table = "<%= lt_server %>"

    width = "50%"

    selectedRowIndex = "<%= ROW_INDEX %>"

    keepSelectedRow = "FALSE"

    selectedRowKey = "SERVERID">

    create the attribute "ROW_INDEX" with type INT4 in your htm page....

    in the class also declare a attribute "ROW_INDEX" with type INT4....

    in the DO_INIT set ROW_INDEX = 1.

    in the DO_REQUEST ...

    lirv_page->set_attribute( name = 'row_index' value = ROW_INDEX ).

    Add a comment
    10|10000 characters needed characters exceeded

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.