OK Mike - so, I downloaded your code - grdbase.prg - and was reviewing it. So, the SaveSource and RestoreSource exists in your PRG as Procs. Should I simply take each chunk of code, create New Methods in the Grid Subclass - and insert the code - then call SaveSource before a data refresh of the grid - and call RestoreSource after? What about the rest of the code in the PRG? Ignore it for now?? I suspect not, as I see your comments in the GrdBase class stating - "...used in SaveSource/RestoreSource". As such - I suspect I should be adding those Properties to my subclassed grid.
Thanks, -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
On 2016-02-02 08:58, Kurt Wendt wrote:
Hey Mike - sorry I didn't see your reply till now.
At first I was hesitant to attempt to try and implement this particular solution - because it involved classes. I first tried to see if I could do it without doing the subclassing. But, then I saw that it required adding Methods and Properties to a Grid. I had done that with Forms - but, didn't know you couldn't do it with a Grid. So
- I took at stab at how to sub-class, just a pure guess - since there
were already a couple of visual classes in the project already - and was glad to see it was so easy to sub-class.
And - they say you Can't teach an Old Dog New Tricks. Well - this Dog just learned something new!
:-) -K-
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Saturday, January 30, 2016 6:32 PM To: profoxtech@leafe.com Subject: Re: Multi-Select Grid & Foxite Code Issue (Was...RE: A Question of ListBoxes)
On 2016-01-29 17:20, Kurt Wendt wrote:
To be honest - I hadn't sub-classed before, but, I figured it out and made a Grid sub-class.
imo, subclassing is the BEST and will allow you to really love the Fox moreso. If I couldn't (or didn't) subclass, I might as well use VB. :-)
OOP is where's it at (still).
--Mike
[excessive quoting removed by server]