cancel
Showing results for 
Search instead for 
Did you mean: 

Table View: Default Selected Line..

Former Member
0 Kudos

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..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

<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 ).

Former Member
0 Kudos

Dear Ram,

I solved it..

Thanks, Sudeep..