on 07-12-2012 9:03 AM
Hi
i have used checkbox in alv. i need it be checked default . tried setting defualt value of attribute it not working
my code.
lt_columns = column_settings->get_columns( ).
LOOP AT lt_columns ASSIGNING <fs_column>.
CASE <fs_column>-id.
WHEN 'PENDING'.
CREATE OBJECT lr_checkbox
EXPORTING
checked_fieldname = <fs_column>-id.
<fs_column>-r_column->set_cell_editor( lr_checkbox ).
FREE lr_checkbox.
ENDCASE.
ENDLOOP.
i want check box to be set checked by default
You can do in this way..
1. Loop the entire records which to be bound to ALV Table,
Loop at LT_ALV_TAB into LS_ALV_TAB.
LS_ALV_TAB-PENDING = 'X' """ It should be CHAR1 or WDY_BOOLEAN type
modify LT_ALV_TAB from LS_ALV_TAB.
endloop.
Hope it may help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pass 'X' to the column/field in the internal table that you populated for the ALV Data. and not sure why would need to call Free on the checkbox.
In case below I passed the 'X' to the field statu(S as column name) while populating the Internal table and bind it to the context data which you use for the mapping to the ALV data.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any help on this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any help on this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.