cancel
Showing results for 
Search instead for 
Did you mean: 

Work Around with editable cell of table

Former Member
0 Kudos

Hi experts,

I have a table with editable cells and after the event "Save" I have to fill the table with the data and I need to make not editable some cells of some row. Is it possible to set the property (editable or not editable) of the cells after binding the table? If yes, what is the method?

Tks a lot

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

Before binding the table you need to modify the table and then bind it..

You have to create read_only attributei tyoe wdy_boolean inside teh node to which thetable is bound..

How many cells/columns are there that you want to set this editable/noneditable property..

Can you be more clear..

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Sure. Add an attribute to the same context node that you have bound to the table. You can then set this attirbute at the element level for each row as to if you want it in edit mode or not. Then bind the enabled property of the inputFIeld column cell editor of each column you want to control to this context attribute.

Former Member
0 Kudos

This attribute have to belong necessarily to the same node that I bind with the table or I can define out the node as an context attribute?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

If you want to control the edit mode at the row level, then this attribute should be in the same context that is bound to the table. This is how the runtime will know what value to use for each row in the table. If you just want to mass control edit mode for all rows of the table, then you could use an attribute from another context node.

Former Member
0 Kudos

Hi,

I have created a subnode of my node where is the structure that I bind with my table. Inside this subnode I have the attribute type wdy_boolean that I have binded at the property "enabled" of the fields of the structure that I want disabled after the event "Save". I have a code like this:

data ENABLED TYPE REF TO IF_WD_CONTEXT_NODE.

NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = `TABLE_R_E` ).

(2) CALL METHOD NODE->GET_CHILD_NODE

EXPORTING

NAME = 'ENABLED'

RECEIVING

CHILD_NODE = ENABLED.

CALL METHOD ENABLED->SET_ATTRIBUTE

EXPORTING

VALUE = ' '

NAME = 'ZENAB'.

but when I execute the method (2) I have that my object ENABLED is initial, so I have a dump when I try to execute the method SET_ATTRIBUTE...

How can I do?

My attribute ZENAB is by default = 'X'...

TKS a lot...

Former Member
0 Kudos

use the code wizard to set the attribute using set_attribute method , control +f7 and

select the appropriate context attribute , set cardinality of the parent node to 1:n

regards,

amit

Former Member
0 Kudos

My parent node has cardinality 0...n (this is mandatory), so how have to be the cardinality of my subnode?

Tks...

Former Member
0 Kudos

can be 1:n for the table structure

Former Member
0 Kudos

Ok, I have my PARENT NODE "TABLE_R_E" that has cardinality and selection 0...n and my subnode "ENABLED" that has cardinality and selection 1...N but I have the same problem, ie when I execute:

CALL METHOD NODE->GET_CHILD_NODE

EXPORTING

NAME = 'ENABLED'

RECEIVING

CHILD_NODE = ENABLED.

I have my subnode ENABLED = INITIAL... If my subnode is initial obviously I can't set the attribute boolean of my subnode...

where am I wrong? I can't modify the cardinality of my node TABLE_R_E, because this cardinality has to be necessarily "0...n"...

Tks...

Former Member
0 Kudos

tks, I solved!