Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox Focus after delete
Message
From
15/07/2002 14:21:27
 
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00678652
Message ID:
00678795
Views:
22
>It's a filter problem evidently (I removed the filter and it worked correctly) - but obviously had records I didn't want to appear in the list.

I assumed it was a data issue. Just tried to find out where <s>.

> THIS.SetFilter(with filter in here)

IMHO, filters are a bit of a no-no so, it doesn't surprise me that you get this kind of problem. Obviously, I don't know your application but if it wasn't too much trouble, a parameterized view might be better. However, depending on the filter expression, if you can restrict your records based on a single key value, then you might consider using SET KEY TO (also, see the Cursor.Select() method). As an experiment, try restricting your data using SET KEY TO and then just see how your list behaves.

Set Key To is a much better option and its massively faster than a filter. However, a filter can be based on fairly wild expressions <s>. If your filtering needs to be so unrestricted and it can change from list to list, then I would consider revising the schema anyway. However, if your filter expression can be restricted to an index key, or, your can create a new key, compound or otherwise, this this may be your answer. On native tables, I do like using SET KEY TO for filtering requirements.

HTH
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform