I have an UltraGrid bound to a ProDataSet via Progress.Data.BindingSource. I progressively build data in the temp-table but only show a subset of that data in the grid and any particular time.
What I would like to be able to do is clear the data in the grid without deleting all the data in the dataset. I've been opening a query such as "for each tablename where false" against the TOP-NAV-QUERY. That works but is probably not the most effecient.
I tried the following, but received an error about repositioning.
httQryHandle = hDataSet:TOP-NAV-QUERY(1).
httQyHandle:CLOSE-QUERY( ).
I also tried
myBindingSource:HANDLE:TOP-NAV-QUERY:QUERY-CLOSE().
It cleared some of the data in the grid but the blank rows were still there. I refreshed both the grid and the bindingsource as well.
Is there something I'm missing that would work in this case?
Regards,
Jim
"for each tablename where false" against the TOP-NAV-QUERY. That works but is probably not the most effecient.
I sometimes use
FOR/PRESELECT EACH tablename WHERE ROWID (talbename) = TO-ROWID ('0x0')
PRESELECT EACH tablename WHERE ROWID (talbename) = ?
also works.
-- peter
Hmmm.
I was hoping for something on the bindingsource or grid that would clear the current result set like BindingSource:Clear( ). The clear method does exist but is not implemented.
Thanks though. Using the rowid is probably a bit faster.
Jim,
Rereading your original post I got to wondering whether there's not a bug there - if you close the query, the PBS should tell the grid that there's no data to show. It might be worth speaking to TS about that. And if the Clear() method isn't implemented, then you could log that too.
-- peter
Peter, thanks.
I can definitely do that.