Thanks for your input RK!
But, at this point - I'm not even doing a re-query yet. I'm just playing with getting proper functionality of the grid - and testing the multi-select feature.
FYI - on this particular screen - which was previously implemented w/2 ListBoxes - the users selects records on 1 listbox - then hits a button to have those records pushed over to the other listbox. And, its at THIS Point when I get working on implementing that button with the new Grid controls - Then I will need to requery. But, for now - I don't need to requery. So, I don't think that for now the requery is the issue I am currently having.
-K-
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Tuesday, February 02, 2016 10:38 AM To: profoxtech@leafe.com Subject: RE: Multi-Select Grid & Foxite Code Issue (Was...RE: A Question of ListBoxes)
Grids are tetchy critters and prone to blowing up with C5 errors, especially if you requery the datasource while its still associated with the object. In general, the tricks have been to temporarily reset it to nothing, rebuild your underlying datasource, and then reestablish the relationship to the grid object. Mike's save and restore source methods will probably go a long way to curing your grid ills.
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Kurt Wendt Sent: Tuesday, February 02, 2016 10:33 AM To: profoxtech@leafe.com Subject: RE: Multi-Select Grid & Foxite Code Issue (Was...RE: A Question of ListBoxes)
Hey Mike - thanks so much for pointing me to your code downloads. I haven't gotten to the point of re-querying the grid - but, I WILL have to do exactly that - and at that point I will look at your code.
I'm actually having a Strange problem with this Grid now - in that it will at times crash the whole VFP application when I am testing out that Grid. But, I may have to post this in a new Thread. I'm trying some stuff out now - before I really post about this issue. But, it's a game stopper - since I can't possibly release this screen to the users if it crashes at times due to users interacting with this Grid!
So - more on this shortly...
-K-
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Tuesday, February 02, 2016 10:29 AM To: profoxtech@leafe.com Subject: RE: Multi-Select Grid & Foxite Code Issue (Was...RE: A Question of ListBoxes)
Honestly....without subclassing, I think I'd hate programming. It surely would not be as enjoyable.
Check out the SaveSource and RestoreSource methods I posted in the ProFox downloads section to add to your grid subclass. Those are MUST HAVEs in my opinion so you never have to rebuild your grids after changing (requerying) the underlying cursor.
hth, --Mike