I made :
aSel:={}
.... add a column for the selection
oCol:= oApp():oGrid:AddCol()
oCol:AddResource("C_Pal")
oCol:AddResource("STATO3")
oCol:bBmpData := { || Ds_Mar(1,2)}
oCol:cHeader := ""
oCol:nWidth := 25
oApp():oGrid:bKeyDown :={|nKey| Val_nKey(nKey,oApp():oDlg)}
.....
STAT FUNC Val_nKey(nKey,oDlg)
CASE nKey==VK_F5
Selecciona()
.....
to Mark the record
STAT FUNC Ds_Mar(cBmp,cCan) // Marca
LOCAL cRet:=0
cRet:=IF((oDCli)->Status="B",cCan,cRet)
cRet:=IF(AScan(oT:aSel,(oDCli)->NumCli)<>0,cBmp,cRet)
RETURN (cRet)
STAT FUNC Selecciona() // Seleccionar registro
LOCAL x:=AScan(oT:aSel,(oDCli)->NumCli)
IF x<>0
ADel(oT:aSel,x)
ASize(oT:aSel,Len(oT:aSel)-1)
ELSE
AAdd(oT:aSel,(oDCli)->NumCli)
ENDIF
oApp():oGrid:Refresh()
RETURN (NIL)