2006 Jul 31 9:35 AM
Hi all,
I am using the alv grid (cl_gui_alv_grid). My problem is that i need to show horizontal gridlines (between rows) only when needed and not always. in the layout of the grid the only option i see will disable all grid lines. Please let me know if anyone has an idea in this regard.
regards
Manoj.
2006 Jul 31 9:58 AM
You can dynamically change the layout of the report and set the grid lines whenever you want. If you are using ALV With classes look at one of the SET_LAYOUT methods. You will have to call this method and then call the REFRESH_TABLE_DISPLAY method.
Regards,
Ravi
Note : Please mark all the helpful answers
You can dynamically change the layout of the report and set the grid lines whenever you want. If you are using ALV With classes look at one of the SET_LAYOUT methods. You will have to call this method and then call the REFRESH_TABLE_DISPLAY method.
Regards,
Ravi
Note : Please mark all the helpful answers
2006 Jul 31 9:38 AM
2006 Jul 31 9:58 AM
You can dynamically change the layout of the report and set the grid lines whenever you want. If you are using ALV With classes look at one of the SET_LAYOUT methods. You will have to call this method and then call the REFRESH_TABLE_DISPLAY method.
Regards,
Ravi
Note : Please mark all the helpful answers
2006 Jul 31 10:14 AM
Hi Ravi,
Could you explain a little further. the only public mehod i see is SET_LAYOUT_OF_DOUBLEGRID in the class CL_GUI_ALV_GRID. Is this the method you are talking about?
Thanks
Manoj.
2006 Jul 31 10:17 AM
yeah there is a method called SET_FRONTEND_LAYOUT. but it takes in only a structure for the layout..i need something to control horizontal lines at the row level.
2006 Jul 31 10:23 AM
You are on track.
What you need to do is to call the GET_FRONTEND_LAYOUT first to get the current layout and do the modifications to that to set / unset the grid lines ( there will be a field for that in the structure LVC_S_LAYO). Once the new value is set call the SET_FRONTEND_LAYOUT method.
Regards,
Ravi
Note : Please mark all the helpful answers
2006 Jul 31 10:32 AM
hi Ravi,
Thanks for the reply. I understood what you are saying but this would adjust the layout of the entire grid. I do not have the option of putting in a horizontal line for one row and disabling it for the next. the 'NO_HGRIDLN' is the grid is a bool.
Any ideas
Regards
Manoj.
2006 Jul 31 10:39 AM
I am afraid that kind of facility is not available with ALV grid.
If the objective is highlight specific rows, you can do that by displaying them in a different color from the rest of the rows.
Regards,
Ravi
2006 Jul 31 10:44 AM
yeah i was afraid of the same. thanks anyway, i have awarded points:-).
I am actually highlighting rows with diff colors already...but wanted this additional feature to show rows in pairs without line in between.
thanks anyways.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |