03-28-2007 9:39 AM
Hi,
I have 10 columns in my grid and 7 of them have SUMS at the end of each column. (wa_fcata-DO_SUM = 'X'.) When I change the cell values or add, delete new rows , the sums of the columns are not updated unless I press the standard Refresh button in the toolbar of the grid.
How can I update the sums after I change the cell values or add, delete rows without pressing refresh button? How can I trigger refresh button action after pressing standard delete row, add row, copy row buttons in the toolbar of a grid?
Thank you.
03-28-2007 11:16 AM
u can call the instance method "refresh_table_display" of the class cl_gui_alv_grid
Hope this solution was helpful
PS : Please award points if helpful.
03-28-2007 11:20 AM
Hi if you are using the OO_ALV method the use the method DAT_CHANGED_FINISHED and after that do REFRESH_TABLE, if you are doing the FM approach then the make the selfield-refresh = 'X' in the perform routine.
Hope that Helps
Anirban M.
03-28-2007 2:36 PM
In ABAP-OO context:
It is the event "DATA_CHANGED_FINISHED" of the class "CL_GUI_ALV_GRID" which needs to be handled.
In the implemenatation of the event handler you need to call the method "REFRESH_TABLE_DISPLAY" of the ALV grid control.
HTH,
Stephan
04-02-2007 7:26 AM
Hi friends,
Sorry for my late reply.
I was also using "DATA_CHANGED_FINISHED" of the class "CL_GUI_ALV_GRID". But my problem is that : When I push the toolbar buttons , program drops into DATA_CHANGED_FINISHED except add_row, copy_row, insert_row, delete_row buttons. When I push these buttons , my program does not drop into DATA_CHANGED_FINISHED method. What's the difference of these buttons?
04-02-2007 10:11 AM
I do not the the difference, but have a look at the eventsd:
before_user_command
or
after_user_command
of class CL_GUI_ALV_GRID
But don't forget to register the events.
For details search the forums/blogs for:
"Easy Reference ALV editable"
Regards,
Stephan