Get Grid Row function

Christian Audet

Christian Audet

Moderator
Staff member
Hi List,

I`m using the function "Get Grid Row" to read ALL THE ROWS from a grid in a Headerless detail. Since I'm normaly using this function in a from exit or in the OK button, I have this question : "Since the Get Grid Row function put the resulting row in the GC, is there any known problem to use this function in the Row is exited and change".

So basicaly what I'm doing is every time the user enter a new row I compare it with all other rows. It's working fine but I have this concern about the Get Grid Row Function in the "Row is Exited and Change" event.

Thank

Christian Audet


Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 
Hi Christian,

GetGridRow exactly do:
======== Copy from Help ====================
GetGridRow causes the specified row to be used for subsequent ER on the current event. If the row specified is greater than the total number of rows, the last row is used. If the row specified is invalid, the active row becomes zero.
============================================
so it does not exactly "put the resulting ROW in the GC" but you can assign values to GCs.

I do not know any problems using GetGridRow in "Row is Exited and Change" but if you ask me I would use it in the In-Line version instead of the Asynch.

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Thank You Zoltan,

The reason I was asking is that I remark that after the Get Row function you have to use the GC to access the resulting row.

Thank Again

Christian Audet

Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 
Hi Christian,
I use the same function in the Row is Exited and Changed - Inline, and have
no problem, to loop through all the records in the grid. I also found
through debugging that the values in the grid for the row being exited have
not changed until you have finished the ER, but will of course change each
time you do the Get Grid Row.
The only thing I do is after I'm through with the loop I restore the row
that was exited to its original values(via another get grid row)to
accomplish some additional processing.

Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6




Bill Feeney
B7332 SP 13.1 Sun Unix Oracle 8.1.6
 
Re: RE: Get Grid Row function

Bill,

Do you have a example of code (caling Get Grid Row for the last row),
because I`m using the function in Row is Exited and Change Async and I still have error in my grid that are not there when removing my code.

Thank you, have a good days.

Christian Audet



Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 
Re: RE: Get Grid Row function

Bill,

I will complete the last message, when you say that you restore the value of the last row, do you have a example to explain why you do that or a sample code will help.

Thank !

Christian Audet



Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 
RE: RE: Get Grid Row function

Hi Christian,
This is the code I was refering to. It is actually in the Col Exited and
Changed - Inline ER. Notice the last thing I do is reposition to the
original grid values.

I hope this is what you are looking for and is helpful.


// *** Begin Changes Bill Feeney 05-04-01 ***
// Add records functionality logic. Bypass overhead logic if added grid
column.
If GC Row FactFrom is not equal to <Zero>
// Accumulate Total Hours Worked
//
VA frm_CurrentRow = GC Row FactFrom
VA frm_HoursWork = "0"
VA frm_RowFactorFrom = GC Row FactFrom
VA frm_RowFactorTrough = GC Row FactThr
// *** Begin Changes Bill Feeney 04-28-01 ***
// Save the row you're on so you can reposition to it after the looping so
you
// can use the correct business unit when creating the overhead record
Get Selected Grid Row Number(FC Grid, VA frm_SavedRowNumber_NOROWS)
While VA frm_CurrentRow is less than or equal to VA frm_RowFactorTrough

Get Grid Row(FC Grid, VA frm_CurrentRow)
VA frm_HoursWork = [VA frm_HoursWork]+[GC Hours]
VA frm_CurrentRow = [VA frm_CurrentRow]+1
End While
//
// re-position on the grid so the GC Business Unit with the value it should
have
// prior to the loop
Get Grid Row(FC Grid, VA frm_SavedRowNumber_NOROWS)
// *** End changes ***

Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6




Bill Feeney
B7332 SP 13.1 Sun Unix Oracle 8.1.6
 
Back
Top