cancel
Showing results for 
Search instead for 
Did you mean: 

Iterator & checkbox

Former Member
0 Kudos

Hello,

I display data in a tableview:

<% create object iterator. %>

<htmlb:tableView id="lief01"

table="<%=model->ERGEBNIS_lief01%>"

allRowsEditable="true"

rowCount="7"

iterator = "<%=iterator%>" />

and then, in my iterator I have to change the characteristics of one of the columns (it must show up as checkbox):

METHOD if_htmlb_tableview_iterator~render_cell_start .

DATA: cb TYPE REF TO cl_htmlb_checkbox,

lr_row_data TYPE REF TO zdxg_clust_lief01. "<-- Structure

lr_row_data ?= p_row_data_ref.

IF p_column_key = 'ZDXG_LIFZ_AA'.

cb = cl_htmlb_checkbox=>factory( id = p_cell_id

text = ' '

disabled = 'TRUE'

textdirection = 'LTR' ).

cb->_checked = lr_row_data->zdxg_lifz_aa. "<- either ' ' or 'X'

p_replacement_bee = cb.

ENDIF.

ENDMETHOD.

when the value is ' ', the checkbox shows up. When the value is 'X', the cell is empty. There´s no marked checkbox.

Does any one know why ??

Thanks a lot.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

to show your checkbox, shouldn't diabled be equal to False

and _checked TRUE/FALSE depending on the default situation?

grtz

Koen

Former Member
0 Kudos

Hi,

nope ... it must be FALSE, because it´s only display. _CHECKED is true or false, depending on value in the table, but when TRUE or 'X', the field doesn´t show up.