Skip to Content
0
Former Member
Jul 10, 2006 at 02:24 PM

Iterator & checkbox

38 Views

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.