How to get temp-table record associated with UltraGridRow

Posted by Richard.Kelters on 08-Sep-2014 04:19

Hi,

Is het possible to determine which record is associated with a certain UltraGridRow or reposition the Grid's associated query to the record associated with a row?

We've added multiple selection possibility to a grid and could reposition a query to row based on the index of the UltraGridRow but now we'd like to add the group-by-box possibilty to such a grid. The group-by option gives the grid extra rows which invalidates the row equals to index comparison.

I could of course do some arithmetic using a break by on the associated query but rather not if there's a simpler way.

Richard

Posted by Mike Fechner on 08-Sep-2014 06:31

Then go for the Row’s ListIndex value, not Index.
 
 
Von: Richard.Kelters [mailto:bounce-RichardKelters@community.progress.com]
Gesendet: Montag, 8. September 2014 13:19
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] How to get temp-table record associated with UltraGridRow
 
Reply by Richard.Kelters

Oliver I'll look into that possibility.

Sorry Mike but REPOSITION QUERY qQry TO ROW <that index> + 1.  does not work when there's a group by in the box because the grid gets additional rows that are 'IsGroupByRow'.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

All Replies

Posted by olivier.dunemann on 08-Sep-2014 04:39

Hi Richard,

We use to put an extra (hidden) column in the grid that stores the ROWID of the record.

When we need to find back the record, we just use the buffer object's FIND-BY-ROWID method.

My 2 cents.

Posted by Mike Fechner on 08-Sep-2014 04:46

Richard, you have the 0 based Index of the Row in the UltraGrid.

REPOSITION QUERY qQry TO ROW <that index> + 1.

Posted by Richard.Kelters on 08-Sep-2014 06:18

Oliver I'll look into that possibility.

Sorry Mike but REPOSITION QUERY qQry TO ROW <that index> + 1.  does not work when there's a group by in the box because the grid gets additional rows that are 'IsGroupByRow'.

Posted by Mike Fechner on 08-Sep-2014 06:31

Then go for the Row’s ListIndex value, not Index.
 
Von: Richard.Kelters [mailto:bounce-RichardKelters@community.progress.com]
Gesendet: Montag, 8. September 2014 13:19
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] How to get temp-table record associated with UltraGridRow
 
Reply by Richard.Kelters

Oliver I'll look into that possibility.

Sorry Mike but REPOSITION QUERY qQry TO ROW <that index> + 1.  does not work when there's a group by in the box because the grid gets additional rows that are 'IsGroupByRow'.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Richard.Kelters on 08-Sep-2014 07:43

ListIndex may indeed help me, I'll have a look.

Checking out the rowid possibility I found tag a nice place to put the rowid but I'll need to go through all rows to fill the tag ...

Posted by Richard.Kelters on 08-Sep-2014 14:38

Indeed ListIndex is what I needed!

Posted by Mike Fechner on 08-Sep-2014 14:40

 
J

This thread is closed