************************************************** *-- Class: cbogrid (c:\proplan70\agrdctrl.vcx) *-- ParentClass: xcbo (c:\common70\basectrl.vcx) *-- BaseClass: combobox *-- Time Stamp: 11/15/02 03:55:06 PM * DEFINE CLASS cbogrid AS xcbo FontName = "Arial" *-- the alternate bound column for the alternate control source cControlSource - 0 to turn off alternate control sourcing - native control source must be the display one nalternateboundcolumn = 0 ccontrolsource = "" Name = "cbogrid" DIMENSION asourcearray[1,1] PROCEDURE Valid = thisform.IsChanged(this) if thisform.lFieldChgd and this.nAlternateBoundColumn > 1 select (thisform.PrimaryTable) replace (this.cControlSource) with this.aSourceArray[this.ListIndex,this.nAlternateBoundColumn] endif ENDPROC PROCEDURE Init assert .f. message "Debug Stop : New code : 08:17 Friday 11/15/2002" * * AgrdCtrl : cboGrid : Init assert not empty(this.aSourcearray[1]) message ; "You must load this.aSourcearray in cboGrid's Init and dodefault()" nAlen = alen(this.aSourceArray,1) if this.lAllowBlank dimension this.aSourceArray(nAlen + 1,3) this.aSourceArray[nAlen + 1,1] = "" this.aSourceArray[nAlen + 1,2] = "" this.aSourceArray[nAlen + 1,3] = "" endif this.RowSourceType = 5 && array this.RowSource = "this.aSourceArray" select (thisform.PrimaryTable) ENDPROC ENDDEFINE * *-- EndDefine: cbogrid ************************************************** ************************************************** *-- Class: cbosupplyby (c:\proplan70\agrdctrl.vcx) *-- ParentClass: cbogrid (c:\proplan70\agrdctrl.vcx) *-- BaseClass: combobox *-- Time Stamp: 11/15/02 02:27:12 PM * DEFINE CLASS cbosupplyby AS cbogrid ControlSource = "supply_by" Style = 2 ToolTipText = "supplied to the customer by" lallowblank = .T. Name = "cbosupplyby" PROCEDURE Init assert .f. message "Debug Stop : New code : 08:17 Friday 11/15/2002" local oSmEnv,oData oSmEnv = newobject("smenv","baseapp") oData = newobject("data","aapp") = usecomtab("suppby") select sb_name,sb_genname,suppby_id from suppby ; where project_id = thisform.oProject.cProjID ; into array this.aSourceArray = dodefault() this.BoundColumn = 1 && Supply_by this.ColumnCount = 1 select (thisform.PrimaryTable) ENDPROC PROCEDURE firsttime ENDPROC PROCEDURE loadcontrol ENDPROC ENDDEFINE * *-- EndDefine: cbosupplyby **************************************************