2012 Mar 27 9:09 AM
Hi,
I have a screen with more than one ALV grid. Only one ALV grid is focused and as the user navigates through the screen, the next ALV gridgets focused...
That all works fine. But the user is confused about the orange marked cell in both ALV grids - meaning even in the one not focused. See my screenshot below.
So I wonder: how I can completly unfocus an ALV grid? I don't want the cell in the second grid in the picture above to be orange. I don't want any kind of mark/selection.
The only thing I know is that if you press on the green "mark all" icon att the upper left corner of the ALV grid (above the mark row buttons), then everything will be marked/selected. If you press again to unmark everything, then there is no orange cell at all left. But what I need to do is to program that. Is it possible?
FYI: I tried methods such as "set_selected_cells" and passing an empty table. It didn't work.
Thanks & best regards,
Melanie
2012 Mar 27 1:19 PM
Did you try to set the focus to another element of the screen via a SET CURSOR statement or a CL_GUI_CONTROL=>SET_FOCUS method ?
Regards,
Raymond
2012 Mar 27 3:27 PM
Hi and thanks for your interest,
I actually did try that. I use SET_FOCUS on the first ALV. But still the second ALV has that orange cell.
I also use SET CURSOR. It doesn't seem to affect the behaviour of the ALV grids.
Any other idea(s)?
Regards,
Melanie
2012 Mar 27 3:36 PM
- You wrote you tried "SET_SELECTED_CELLS", did you also try "SET_SELECTED_COLUMNS" and "SET_SELECTED_ROWS" ?
- Has "REFRESH_TABLE_DISPLAY" with "soft" parameters any effect ?
- Did you execute a cl_gui_cfw=>flush at the end of your methods ?
Regards,
Raymond
2012 Mar 28 1:11 PM
Hi again,
Yes I did pretty much try all SET_SELECTED* methods.
I am using REFRESH_TABLE_DISPLAY and it has no effect at all.
Yes, I am flushing as I should.
I guess it's not possible then... needs improvement in my opinion.
Thanks & regards,
Melanie
2012 Apr 02 12:24 PM
I assume this is not possible and thus set the question as answered.
Best regards,
Melanie
2012 Apr 02 5:28 PM
Hi,
Did you try flush after set_focus?
call method cl_gui_control=>set_focus
exporting
control = grid_1.
call method cl_gui_cfw=>flush.
Best Reagrds,
Maria João Rocha
2012 Apr 03 6:16 AM
Hi there,
Yes I focus and flush as I have written above. I'm not new to this.
This thread is no open question anymore. It's simply not possible as for now and that's alright. Please don't just guess things I might could try out - that wasn't the point. It was merely meant if someone has acutally done this.
/Melanie