UltraGrid REPOSITION-TO-ROWID

Posted by tpavlovic on 15-Oct-2013 06:50

How do I bring the newly created row into the view? After hQuery:REPOSTITION-TO-ROWD (...)  it is off the screen. Progress' Browse widget does this automatically I don't know why is it such a problem with UltraGrid.

Posted by Mike Fechner on 16-Oct-2013 02:06

You are executing code on a client with temp-tables or DB tables?

For temp-table queries on the client, try to open the query without the INDEXED-REPOSITION option. Then you may query the CURRENT-RESULT-ROW property of the Query. Use that to set the Position attribute of the BindingSource (ensure you keep the offset by -1 as .NET starts counting at zero and Progress counts from 1.

All Replies

Posted by Phillip Molly Malone on 15-Oct-2013 19:19

Have you re-opened the query after creating the record? If not, you would need to do that to have it in the query.

HTH

Posted by tpavlovic on 16-Oct-2013 00:04

Yes I have.

<query>:QUERY-OPEN ().

<query>:REPOSITION-TO-ROWID (<rowid>).

Query *is* on the correct record, it is just off the screen.

Posted by Mike Fechner on 16-Oct-2013 02:06

You are executing code on a client with temp-tables or DB tables?

For temp-table queries on the client, try to open the query without the INDEXED-REPOSITION option. Then you may query the CURRENT-RESULT-ROW property of the Query. Use that to set the Position attribute of the BindingSource (ensure you keep the offset by -1 as .NET starts counting at zero and Progress counts from 1.

This thread is closed