At 05:14 PM 3/31/2011, Victor Timmons wrote:

I'm using a Variable Lookup List on one of my forms. I have a "on click epp"
that is used to turn on and off differant buttons on the for depending on
the order that is listed status. At the end if the code if have I am using
a REFRESHLIST property to update the list. Here is the issue when it hits
that REFRESHLIST it goes to the top of the code and restarts with all of it
this ends up in and endless loop with no way out. If I take it out of the
code all is well and it runs like it should. Except it does not REFRESHLIST.
Any ideas on how to fix this would be helpful.

Victor,

In your specific situation, you may want to take advantage of new
TOPITEM property of the ListView control to achieve your goal.

So, in your case, right before the REFRESHLIST command, you would
use the following technique to maintain the current position of
selected item in the ListView, even after updating the row(s) and
switching back to the ListView.

Here's how:

-- Your original code here ..
-- Your UPDATE command here ...
   CLEAR VARIABLE vTopItem
   SET VAR vTopItem TEXT = NULL
   GETPROPERTY ListView TOPITEM vTopItem
   PROPERTY ListView REFRESHLIST 'TRUE'
   PROPERTY ListView TOPITEM .vTopItem
   CLEAR VARIABLE vTopItem
   RETURN

Hope that helps!

Let me know if you need a sample application to demonstrate the use
of PROPERTY and GETPROPERTY <ListViewComponentID> TOPITEM value.

Have fun stepping up from 7.5 to 9.1.

Very Best R:egards,

Razzak.


Reply via email to