cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable a single cell in a table (and not the whole column)

ged_hurst
Participant
0 Kudos

Hi there,

I've got a webdynpro table with a few columns, rows can be created dynamically through a button in the table toolbar.

Depending on the value of a certain cell I have to disable another cell (in the same row).

I tried to manipulate the view in the modifyview but no joy. I also tried to manipulate the attribute property through the coding below:


  DATA lv_knttp TYPE knttp.
  ....
  lo_nd_kostl = wd_context->path_get_node( path = `MULTIVALUES.KOSTL` ).
  lo_el_kostl = lo_nd_kostl->get_element( ).

  lo_el_kostl->set_attribute_property(
  attribute_name = 'LTEXT'
          property       = lo_el_kostl->e_property-enabled
          value          = ''
 ).

but it disables the whole column!!!! I just need the cell to be disabled (I thought the code above, through the lead selection, would affect a certain cell only - but I was wrong).

Any ideas?

Thanks!!!

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

using cell variants you can do this.,

check this article: [Cell Variants in WDA|http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproforABAPCellVariants]

Instead of binding the read only property of table as a whole , just bind the read only property of column group of table., You can do this bu drill down the table and select the required column and bind the read only column.,

then In onAction Event of button .,

loop the table, if condition satisfied set the read only property to true else false.,!!

hope this helps u.,

Thanks & regards,

Kiran

ged_hurst
Participant
0 Kudos

Thank you very much,

that's solved my problem.

I've given you full points!

Regards

Edited by: DEVELOPMENT THEMIS on Jul 3, 2011 11:06 AM

Answers (0)