Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
grid_hgl_prepare(this, RGB(0,0,0) , RGB(177,215,222),'Column1')
grid_hgl(this)
PROCEDURE grid_hgl_prepare
LPARAMETERS toGridRef,tnSelForeColor,tnSelBackColor,tcPreservedColumns
*toGridRef reference to grid object
*tnSelForeColor selected row foreground color,integer ( ret by GetColor())
*tnSelBackColor selected row background color,integer
*tcPreservedColumns columns that will not be changed
LOCAL lnForeColor,lnBackColor,i
toGridRef.addproperty('GridRecno',0)
lnForeColor = toGridRef.ForeColor
lnBackColor = toGridRef.BackColor
tcPreservedColumns = IIF(VARTYPE(tcPreservedColumns)#'C','',tcPreservedColumns)
FOR i=1 TO toGridRef.ColumnCount
IF !toGridRef.Columns(i).name $ tcPreservedColumns
toGridRef.Columns(i).DynamicBackColor = ;
"iif(this.GridRecno = RECNO(),"+alltrim(str(tnSelBackColor))+","+alltrim(str(lnBackColor))+")"
toGridRef.Columns(i).DynamicForeColor = ;
"iif(this.GridRecno = RECNO(),"+alltrim(str(tnSelforeColor))+","+alltrim(str(lnForeColor))+")"
ENDIF
ENDFOR
RETURN
PROCEDURE grid_hgl
LPARAMETERS toGridRef
*toGridRef reference to grid object
IF RECNO()# toGridRef.GridRecno
toGridRef.GridRecno = RECNO()
toGridRef.Visible = .t.
ENDIF
RETURN