>LPARAMETERS nColIndex >LOCAL lcCatCode, lnFacCatCode, lcAlias, lcFilter, lnRecNo > >Select pxCOMPLETE && Source of the grid in question >lnRecNo = RECNO() && THIS always returns that of record top of grid and not newly selected row >lcCatCode = pxCOMPLETE.CATCODE > >* If the parent completion record of a classn. has an mPlan Fac. Cat. Code assigned to it then filter the >* available Fac. Desc. records, for the combo, to only those that belong to the assigned fac. cat. code (or >* those that belong to none - i.e. not got a cat yet. >* Otherwise un-filter Fac Desc table (in case it was filtered) >* NOTE this goes in a selection combo in one of the grid cells of the child table >* ____________________________________________________ >lnFacCatCode = pxComplete.FacCatCode >Select FACDESC >If EMPTY( lnFacCatCode) > Set Filter To >Else > lcFilter = "FAC_CAT_CODE = " + ALLTRIM( STR( lnFacCatCode)) + ; > " OR EMPTY( FAC_CAT_CODE)" > Set Filter To &lcFilter >Endif >Locate >Thisform.grdClassn.Refresh() && This grid's child grid > >Select pxCOMPLETE >Replace all PXCOMPLETE.lSELECTED with .F. && used to mark current rec with dynamicbackcolor >GOTO lnRecNo && SHOULD be currently selected row but goes to top >Replace PXCOMPLETE.lSELECTED with .T. && used to mark current rec with dynamicbackcolor > >Thisform.lEntryCodes = .F. >Thisform.Refresh() >Thisform.LockScreen = .F. >>
>With thisform > If .lEntryCodes > .grdEntryCodes.Column2.DynamicBackColor = "IIF( PXENTRYCODES.lSELECTED = .F., ; RGB( 255, 255, 255), RGB( 255,128,128))" > Else > .grdCompletion.Column2.DynamicBackColor = "IIF( PXCOMPLETE.lSELECTED = .F., ; RGB( 255, 255, 255), RGB( 255,128,128))" > Endif >Endwith >>