06-20-2013 12:16 PM
Hi,
I am using the below code,
field_style of type lvc_t_styl.
Data: ls_stylerow type lvc_s_styl.
loop at lt_output into wa_output.
if wa_output-x = 'PQR'.
v_index = sy-tabix.
ls_stylerow-fieldname = 'XYZ'.
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
append as_stylerow to wa_output-field_style.
modify lt_output from wa_output transporting field_style index v_index.
endif.
clear: wa_output, ls_stylerow.
endloop.
ls_layout-styfname = 'FIELD_STYLE'.
Call method o_grid2-> set_table_first_display
Exporting
is_layout = ls_layout
it_toolbar_excluding = lt_ui_functions
importing
it_outtab = lt_output1
it_fieldcatalog = t_fcat1.
Still fields are not getting edited based on condition given.
I know we can modify the fieldcatalogue & make the field editable without any condition, COuld you please help how can I make field editable in specific cases
Thanks
Vinay
06-20-2013 1:52 PM
Hi Vinay,
1. use EDIT = 'X' in fieldcataloge for the field 'XYZ'.
2. Register the edit event.
CALL METHOD O_GRID2->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
Regards,
Mordhwaj
06-20-2013 1:52 PM
Hi Vinay,
1. use EDIT = 'X' in fieldcataloge for the field 'XYZ'.
2. Register the edit event.
CALL METHOD O_GRID2->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
Regards,
Mordhwaj
06-21-2013 4:47 AM
10-25-2013 10:48 AM
If possible, can you share the exact working piece of code for this issue - making alv field editable based on field-value?
Regards,
KS
10-28-2013 9:37 AM
for anyone who wants the exact working abstract of code for this issue: