-
OOALV 行、列和单元格颜色设置
-
OOALV中的CHECKBOX字段挺麻烦的
示例程序: BCALV_EDIT_05
OO ALV with check boxes, icon and popup message to modify the output at runtime.
LOOP AT gt_fcat INTO gs_fcat .
IF gs_fcat-fieldname = ‘CHECK’ .
gs_fcat-checkbox = ‘X’.
gs_fcat-edit = ”.
ENDIF .
MODIFY gt_fcat FROM gs_fcat .
ENDLOOP .
特别注意!!还得在创建屏幕对象、ALV初始化代码后面加上这个:
CALL METHOD grid1->set_table_for_first_display
EXPORTING is_layout = gs_layout
* i_structure_name = 'ZMAY_MARA_003'
CHANGING it_fieldcatalog = git_fieldcat
it_outtab = git_alvdata[].
* 只有写了下面这个,check才会即时选上
CALL METHOD grid1->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
网友评论