cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight the table rows if the corresponding row's checkbox is checked...

zayidu
Participant
0 Kudos

Hello Experts,

How to highlight a table row, if "checked" a row?? - Webdynpro - ABAP - SALV_WD_TABLE

Requirement: As the selected rows are highlighted(Below Image), the same functionality needed through Checkbox selection.

Thank you.

Regards,

Zayidu A

Accepted Solutions (0)

Answers (2)

Answers (2)

maheshpalavalli
Active Contributor
0 Kudos

Hi Zayidu,

If you want multi selection in ALV just like that normal table then you can enable that as well like it is shown in the below url.

http://www.onsap.com/questions/139/how-to-have-multiple-selection-in-web-dynpro-alv

Else if you want it to be a check box then there is cell action event, in that event you can check if that check box is selected and you will get the row number.

http://abaperstreet.blogspot.com/2014/07/using-checkbox-in-alv-webdynpro-with.html?m=1

Now here get the table binding node context and set that particular record as selected. You can see in the below url how to set select the item.

https://blogs.sap.com/2013/05/23/multi-select-rows-in-webdynpro-alv-with-out-using-ctrl-key/

Using this combination of multiple blogs you can solve your requirement.. 🙂

BR,

Mahesh

zayidu
Participant
0 Kudos

Hello Mahesh,

Thank you so much for your reply.

I have done all the above, and also I implemented one of the solutions mentioned by Raymond; but still, it couldn't be achieved.

Thank you.

raymond_giuseppi
Active Contributor
0 Kudos

When user check any box, event ON_DATA_CHECK should be raised (if_salv_wd_table_settings~set_cell_action_event_enabled) , so if you handle it you could change record color (wdui_table_cell_design)

zayidu
Participant
0 Kudos

Hello Raymond,

Thank you so much for your reply.

But still, I couldn't achieve the functionality in the way you said to implement; in fact, the debugger doesn't open/stop at that event handler ON_DATA_CHECK's method when I check an item.

Requesting you to please give the sample code or any other idea.

Thank you..