05-08-2007 2:16 PM
Hi all,
I saw similar threads on this forum, but didn't find the answer. Do you know if that is possible to force grid to return selected rows when is in edit mode? When I switch to display mode everything works just fine.
regards,
Marcin
05-08-2007 3:25 PM
I found out that the problem occurs when I try to get selected rows in user_command event (after pressing on grid's toolbar button), then get_selected_rows method returns empty table. When I call this method using e.g. gui status button then it works ok. Strange thing, looks like the grid clears the selection when toolbar button is pressed and grid is in edit mode.
05-08-2007 4:49 PM
It is necessary to enforce the ALV to transport data from the frontend to the backend. Therefore register the event
Register 'Enter' event
CALL METHOD go_alv->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
After then clicking 'ENTER', the data should be available in the ABAP program. Without any user interaction it is not possible (as far as I know).
Best regards,
Thomas
05-09-2007 8:25 AM
Well, yes, I have registered edit event before, but this is not behaviour which I wanted to have. Because normally, if you press the button delete, the you would expect that after that all the changes are triggered to the backend, but it works only after you press enter. I just changed the application a bit, and registered edit event mc_evt_modified. It is still not exactly what I wanted to have, but is better then before.
Marcin
09-22-2008 2:20 PM
You can try calling method <alv_list>->check_changed before proceeding. This method does a sync between GUI and application server.