cancel
Showing results for 
Search instead for 
Did you mean: 

how to make only first entry in table noneditable

Former Member
0 Kudos

Hi,

Only the first entry in the table should be made noneditable and remaining editable.

Thanks and Regards,

Sridevi

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_szcs
Active Contributor
0 Kudos

Hello Sridevi,

the key to the solving this problem is to bind the enabled or readOnly property of the table cell editors to an context attribute that is part of the dataSource node of the table. Since each element within this node represents a row, you become now able to set

enabled or readOnly on a per-row level.

Best regards,

Thomas

0 Kudos

Hi Sridevi,

make it first your table will non editable all the rows.

then use small button, write some code inside that to edit from the second row onwards.

sample code:

IF lo_el_professional_data IS INITIAL.

CALL METHOD lo_nd_professional_data->create_element

RECEIVING

element = lo_el_professional_data.

ENDIF.

l_count = lo_nd_professional_data->get_element_count( ).

l_index = lo_nd_professional_data->get_lead_selection_index( ).

l_index = l_index + 1.

lo_el_professional_data = lo_nd_professional_data->create_element( ).

CALL METHOD lo_nd_professional_data->bind_element

EXPORTING

new_item = lo_el_professional_data

set_initial_elements = abap_false

index = l_index

Regards,

Naresh.