On 2016-02-03 16:45, Kurt Wendt 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...
Usually this is my data requery event (handtyped for this email):
[thisform.GetRecords method] local liCnt as integer
if vartype(this.grd) = "O" then this.grd.SaveSource() endif
liCnt = this.obiz.MyRoutineThatGetsTheData()
if vartype(this.grd) = "O" then this.grd.RestoreSource() endif
That takes care of only running grid code when it's present.