Look into AEVENTS() to see where the event originated.
Fred
On Wed, Feb 3, 2016 at 2:45 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Wow - didn't realize I was 3 Hotfixes behind! But, I don't control it here.
I just spoke to my manager about it - and, no - its not going to happen - no updating with HotFixes. No way to know if the hotfixes actually break something that was working - and she said we just can't take that chance.
I actually WANTED to put that Data_Resort() call directly into a Click event - but, the Click Events and the Columns are not available at design time in the subclassed Grid.
AS for the BindEvent. I tried it. The Method I created is at the main Grid level of the subclasses Grid. I did the BindEvent in Init of the Form. At that point the Columns & Click events in the subclassed Grid are accessible after I set the RecordSource. So I did a Bind of a Method to the Click Event. Problem is - when its actually running - and it runs the Event - within that Event as its running - its at the Grid level and NOT the Column level. So at that point I can't actually pass the Column ControlSource to let the code know Which field the Sort needs to be based upon.
So - as of now - my attempt to use the BindEvent actually failed...
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Wednesday, February 03, 2016 3:56 PM To: profoxtech@leafe.com Subject: RE: Multi-Select Grid & Foxite Code Issue (Was...RE: A Question of ListBoxes)
On 2016-02-03 14:51, Kurt Wendt wrote:
Mike - thanks for all your input.
FYI - VFPSP2 v 9.00.0000.5815
https://www.berezniker.com/content/pages/visual-foxpro/vfp-90-versions
I've been testing of code on this test Form - and on there I have a Regular Grid and the subclassed Grid. So, I've been testing code on the regular grid - and have the current functionality to sort the data by hitting column header. Its just getting that similar code applied to that subclassed Grid that seems to be the issue. Of course, yeah, things will have to be implemented a bit differently.
That method, Data_resort, actually is the custom Method of the subclassed Grid - which will handle the sorting.
How about putting "thisform.Data_Resort()" in the Whatever.Click event?
Am trying out the BindEvent now, but, may resort to using your code below. Will report back on my progress...
I'm sure BindEvent is great as many greats here suggest it, but I never got into it.
[excessive quoting removed by server]