cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically bind Checkbox Cell-Editor in WD Table Column

0 Kudos

Hello,

i have a problem with the dynamic creation of a Table Column, that contains a checkbox cell editor.

My Coding:

LOOP AT <table_column_it_tab>.


     lr_table_column = cl_wd_table_column=>new_table_column( ).

     lr_table_header = cl_wd_caption=>new_caption( text = lv_string ).

     lr_table_column->set_header( lr_table_header ).


     lr_checkbox = cl_wd_checkbox=>new_checkbox( bind_checked = `NODE_DYN.`  &&  <column_name>  && `_FLAG` ).

     lr_table_column->set_table_cell_editor(  lr_checkbox  ).

ENDLOOP.

My Problem:

The Table and the Columns with Check boxes appears, but if i check the first row, and select another row (wdmodifyview action) all rows are checked. I think that my checkbox binding is incorrect? (It appears, that all rows are bound to the first context element)

best regards

Tobias Arnold

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Tobias,

Which is the context attribute that you have bound to the CHECKED property?

Please check the context node of the same. The property CHECKED should be bound to an attribute of type wdy_boolean and it should be defined in a context node with cardinality 0:N . This will work then.

0 Kudos

Hello Kiron,

my context node code:

node_info = node_info->add_new_child_node(

                               name = 'NODE_DYN'

                               is_mandatory = abap_false

                               is_multiple = abap_true

                               static_element_rtti = struct_type

                               is_static = abap_false

    ).

All attributes are from type "WDY_BOOLEAN" in  "struct_type".

Is something wrong with the node? (in Debugger i see that he have the cardinality 0:N, because i seen 8 Elements in the node)

Thank you,

Tobias Arnold

Edit:

I tried to bind the text of the checkbox to another attribute (type string). It works perfect. Why the bind_checked doesn't work, I don't know...

Answers (0)