cancel
Showing results for 
Search instead for 
Did you mean: 

editing table column cell editor dynamically

Former Member
0 Kudos

I have a table in my webdynpro application. after displaying it in the browser,when a user selects a particular row and click on a edit button i want that specific row to be changed to edit mode .can anyone help me how to do this??

Edited by: harshith_reddy on Oct 20, 2011 7:49 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi harshith reddy ,

you can create attribute in your node for read only property for the table colums and get the lead lead selection of the selected line and make it editable field

below is the sample code snippet .

NODE = wd_context->get_child_node( name = NODE_NAME').
element =wd_context->get_element( ).

*default you can set it to read only 
NODE->set_attribute( value  = 'X'         name   = 'COLOUMN1' ).
NODE->set_attribute( value  = 'X'         name   = 'COLOUMN1' ).

*make the selected line editable 
lv_current_index = lo_nd_dist_table->get_lead_selection_index( ).
if lv_current_index le  0 .
*   report message
    lv_msg_id = lo_message_manager->report_error_message( message_text = 'Please Select a Line Edit ').
else.
 NODE->set_attribute( value  = '  '         name   = 'COLOUMN1'  INDEX  = lv_current_index ).
 NODE->set_attribute( value  = '  '         name   = 'COLOUMN2'   INDEX  = lv_current_index  ).
endif.

Regards,

chinnaiya P

Former Member
0 Kudos

my requirement is that i want the table column cell editor to be changed from textview to inputview when a row is selected.

i think we need to program dynamically to do it. please help me.

Former Member
0 Kudos

You have use CELL_VARIANTS (in table/ALV) to do that. there are many postings/Articles on the same....Please search it.