cancel
Showing results for 
Search instead for 
Did you mean: 

Get Cell Value (Tableview)

Former Member
0 Kudos

Hi,

I use tableview for a BSP tool.

When I use the tableview, and I get the data, it's alright.

table ?= cl_htmlb_manager=>get_data( request = request
                                     name    = 'tableView'
                                     id      = 'start_tbv_pack' ).

      table_event ?= table->data.
      lv_i = table_event->selectedrowindex.

      data = table_event->get_cell_value( row_index    = lv_i
                                                       column_index = '2' ).

But when I use a tableviewcolumn, in my BSP, the table_event->get_cell_value is empty.

The function can get the cellname (start_tbv_pack_3_2) but is not returning any values.

Code:

<htmlb:tableView id               = "tbv_pack"
                           headerText       = "Pack configuration"
                           width            = "100"
                           headerVisible    = "true"
                           design           = "alternating"
                           visibleRowCount  = "<%= lv_i %>"
                           fillUpEmptyRows  = "true"
                           showNoMatchText  = "true"
                           filter           = "server"
                           sort             = "server"
                           onHeaderClick    = "MyEventHeaderClick"
                           onRowSelection   = "SET_PACK"
                           selectionMode    = "LINEEDIT"
                           selectedRowIndex = "<%= controller->lv_packselect. %>"
                           table            = "<%= model->packs %>"
                           tabIndexCell     = "true"
                           iterator         = "<%= model->ADMIN_ITERATOR %>" >
            <htmlb:tableViewColumns>
              <htmlb:tableViewColumn columnName = "pack_type"
                                     title      = "Pack" >
              </htmlb:tableViewColumn>
              <htmlb:tableViewColumn columnName = "start_date"
                                     title      = "Start date" >
              </htmlb:tableViewColumn>
            </htmlb:tableViewColumns>
          </htmlb:tableView>

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184111
Active Contributor
0 Kudos

Hi Hans,

Have a look at the thread...

[Retrieving value of editable cell of tableview|]

Regards,

Anubhav

Former Member
0 Kudos

Doesn't work.

I can retrieve the cell name, but not the cell value...

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

Declare the table view column in capital letters:

Here is the code:

<htmlb:tableView id               = "tbv_pack"
                           headerText       = "Pack configuration"
                           width            = "100"
                           headerVisible    = "true"
                           design           = "alternating"
                           visibleRowCount  = "<%= lv_i %>"
                           fillUpEmptyRows  = "true"
                           showNoMatchText  = "true"
                           filter           = "server"
                           sort             = "server"
                           onHeaderClick    = "MyEventHeaderClick"
                           onRowSelection   = "SET_PACK"
                           selectionMode    = "LINEEDIT"
                           selectedRowIndex = "<%= controller->lv_packselect. %>"
                           table            = "<%= model->packs %>"
                           tabIndexCell     = "true"
                           iterator         = "<%= model->ADMIN_ITERATOR %>" >
         
              <htmlb:tableViewColumn columnName  = "PACK_TYPE"
                                     title      = "Pack" >
              </htmlb:tableViewColumn>
              <htmlb:tableViewColumn columnName = "START_DATE"
                                     title      = "Start date" >
              </htmlb:tableViewColumn>
      
          </htmlb:tableView>

Hope this helps you.

Regards,

Rajani