Selecting all grid rows

karenet

Active Member
Hi list,
I have a grid in which I like to program a form/row exit to select all rows displayed on the grid no matter how many rows are showing, as opposed to using the mouse and/or keyboard to select all grid rows. On my form, I have the Grid Preferences (Multiple Select) check box selected to process multiple grid rows.

Is there a system/business function out there that will select all grid rows for me? If not, then is there any way to perform the task?

Thanks in advance for your help.

K
Xe SP17 AS400 Win2000
 
Hi "karanet",

Excuse me but it isn't clear enough for me that what is your problem:

A.) Select rows programatically from ER instead of user interaction
B.) To process all rows which have been selected by the user previously
C.) Simply to process all rows in the grid, no matter that is it selected by the user or not

The solutions differ in each case, so please, describe your problem for us (me) a bit detailed, making possible to help you. Thanks.

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Zoltan,
Thanks for your response. I'll try to present more detail now.

I have a grid which, after pressing the FIND button, displays rows on the grid fetched from my business view. The number of rows fetched will vary based on what the user placed in QBE or FC columns. Now, after the rows show up on the grid, I'd like to present a form/row exit to automatically highlight each grid row just as if the user selected/highlighted the grid rows using their mouse. The SELECT/OK button functionality takes over after the rows are selected/highlighted and does further processing after that.

My application program mirrors the JDE "PO Speed Status" update program only that I'm updating a custom column on a F55... table. The selected/highlighted grid rows are used for the update.

There will be situations where the user will have hundreds of updates to make and will want to select/highlight each grid row in order for the SELECT/OK button to process the row. The form/row exit button to select/highlight all displayed grid rows will expedite the processing.

K
Xe SP17 AS400 Win2000

<P ID="edit"><FONT SIZE=-1>Edited by karenet on 3/6/02 09:28 AM.</FONT></P>
 
karenet,

I didn't know any method how to select grid rows from event rule but I can suggest a workaround for you.

(Note: You forgot to tell me the type of the form. I suppose a Find/Browse type now).

Just briefly, because I am hurry.
1.) Add a hidden column or a grid scope variable to the grid for selection flag purpose (e.g. grd_Selected_EV01, based on EV01 DD item)
2.) Set this flag to 1 when your row is selected and to 0 when not selected.
3.) Set the colour of the selected rows to a different colour (e.g. blue) and reset the colour when the row is de-selected.
4.) Switch the flag and the colour in the Button Clicked event of the Select form exit based on the previous value of the flag.
5.) Process only the rows which had been flagged by 1.

Hope, could help. Please, let me know if you have further questions and let we know your results.

On the other hand, I had recently (2/22/2002) replied a thread with the subject "checkbox in grids" where I suggested to play with check-marks on the row header. If you are interested in it then please, locate it here or in the archives.

Good luck,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Back
Top