AfterRowColChange Method
Object:frmordhistory.grdOrdHistory
Expand/Collapse source code of procedure grdOrdHistory.AfterRowColChange Source Code
LPARAMETERS nColIndex

IF RECNO("history") == THISFORM.nOrderRec
	*- the user hasn't moved off of this record -- only changed columns, so ignore
	RETURN
ENDIF

*- if they checked a row in the items grid, give the
*- user the option to save items first
SELECT cItems
IF TSBaseForm::DataChanged()
	IF MESSAGEBOX(ITEMNOTSAVED_LOC, ;
		MB_ICONEXCLAMATION + MB_YESNO, ;
    	TASTRADE_LOC) == IDNO
    	GOTO THISFORM.nOrderRec IN "history"
    	THIS.Refresh
		SELECT customer
    	RETURN
    ELSE
    	=TABLEREVERT(.T.)
    ENDIF
ENDIF

SELECT orders
=SEEK(history.order_id, "orders", "order_id")
=REQUERY("cItems")
*- disable tag checkbox in grid if items can't be added to current order
THISFORM.grdLineItems.Refresh
THISFORM.grdLineItems.grcTag.chkItemTag.Enabled = THISFORM.cmdAddToCurrentOrder.Enabled
SELECT customer

*- update order record number
THISFORM.nOrderRec = RECNO("history")