Class SY_GridHandler

Inherits

SY_Constant

Properties

LOCAL cAutoCompCellTypes$="~NORMAL~LOOKUPHIDEBTN~MULTI_LINE~"  

cell types that support auto-complete

LOCAL cCentreCellTypes$="CHECKBOX, CHECKMARK, CHECKBOXRAISED, CHECKBOXRECESSED, "+"CHECKMARKRAISED, CHECKMARKRECESSED, "  
LOCAL cEnterLikeTab$="Y"  
LOCAL cGridDefaultRowHeight=1.42  
[numeric] Default row height for all grids
LOCAL cLookupCellTypes$="LOOKUPHIDEBTN, DROPBOXHIDEBTN, DROPBOX, VARDROPBOX, "+"VARDROPBOXHIDEBTN, LOOKUP, QUERY, QUERYHIDEBTN, "  
LOCAL cSearchDialogueCreated=isFALSE  
LOCAL cExcelInstalled=isFALSE  
LOCAL cAllUsers$=DIM(10, "#")  
LOCAL cAllComps$="###"  
LOCAL cAllWrks$="###"  
LOCAL cOpenedNOMADSGridTable=isFALSE  
LOCAL cLocalGridVariablesSet=isFALSE  
PROPERTY GridIOL$  

Methods

FUNCTION AddColumn(gridCtl, Column, ColumnName$, Title$)  
FUNCTION ClassChangeGrid(gridCtl)  
FUNCTION ClassInitializeGrid(gridCtl)  
FUNCTION ClassOnFocusGrid(gridCtl)  
FUNCTION ClearGrid(gridCtl)  
FUNCTION DisableGrid(gridCtl)  
FUNCTION DropColumn(gridCtl, Column)  
FUNCTION DropColumn(gridCtl, Column$)  
FUNCTION DropRow(gridCtl, Row)  
FUNCTION EnableGrid(gridCtl)  
FUNCTION ExportToExcel(gridCtl)  
FUNCTION FindColumnHeader(column$, mainGridCtl)  
FUNCTION FindColumnHeader(column$, mainGridCtl, secGridCtl)  
FUNCTION FreezeColumn(gridCtl, Column)  
FUNCTION FreezeColumn(gridCtl, Column$)  
FUNCTION GetALEColumnInfo(gridCtl, id$, class$)  
FUNCTION GetALEColumnInfo(gridCtl, ID$, class$, column$)  
FUNCTION GetColumnAttributes(gridCtl, col, attrib$)  
FUNCTION GetGridIndex(gridCtl)  
FUNCTION GetGridIOLIST$(gridCtl)  
FUNCTION GotoCell(gridCtl, Row, Column)  
FUNCTION GotoCell(gridCtl, Row, Column$)  
FUNCTION GotoColumn(gridCtl, Column)  
FUNCTION GotoColumn(gridCtl, Column$)  
FUNCTION GotoRow(gridCtl, Row)  
FUNCTION HideColumn(gridCtl, ColumnNo)  
FUNCTION HideColumn(gridCtl, ColumnName$)  
FUNCTION InitializeRow(gridCtl)  
FUNCTION InsertRow(gridCtl, Row)  
FUNCTION IsColumnHideAble(gridCtl)  
FUNCTION IsColumnInGrid(gridCtl, columnName$)  
FUNCTION IsColumnMoveAble(gridCtl)  
FUNCTION LoadGrid(gridCtl)  
FUNCTION LoadGrid(gridCtl, startRow, endRow)  
FUNCTION LoadRow(gridCtl, Row)  
FUNCTION LockGrid(gridCtl)  
FUNCTION OnExitWithGrid(gridCtl)  
FUNCTION OnExitWithGrid(mainGridCtl, SecGridCtl)  
FUNCTION ParseQuickString(sp, s$, r$, sep$)  
FUNCTION RefreshGridBindings(srcToRead$)  
FUNCTION RemoveGridFocus(gridCtl)  
FUNCTION SaveGridSettings(gridCtl)  
FUNCTION SaveGridSettings(gridCtl, ScndGrid)  
FUNCTION SaveRow(gridCtl, Row)  
FUNCTION SetColumnAttributes(gridCtl, col, attrib$)  
FUNCTION SetColumnAttributesHeadersMain(gridCtl, col, attrib$)  
FUNCTION SetColumnAttributesHeadersSec(gridCtl, col, attrib$)  
FUNCTION SetGridPresets(MainGrid, SecGrid, skipProperties)  
FUNCTION SetGridPresets(MainGrid, SecGrid)  
FUNCTION SetGridPresets(MainGrid)  

Set Grid Presets (common properties) for main and secondary grids

ParameterDescription
MainGrid [input, numeric] Control ID for main grid
SecGrid [input, numeric] {Optional} Control ID for secondary grid
skipProperties [input, boolean] {Optional} when true (1) skip setting properties that once set on the initial setup of the grids do not need to be set again
Returns [boolean] True (1), always successful
FUNCTION SetupGrid(gridCtl, Form$, GridName$, MntOption)  
FUNCTION SetupGrid(MainGrid, Form$, GridName$, MntOption, SecGrid)  
FUNCTION SetupGrid(mainGrid, form$, grid$, mntOpt, secGrid, startKey$)  
FUNCTION ShowColumn(gridCtl, ColumnNo)  
FUNCTION ShowColumn(gridCtl, ColumnName$)  
FUNCTION ShowColumns(gridCtl)  
FUNCTION ShowRow(gridCtl, Row)  
FUNCTION LOCAL AddGroups(gridCtl, col$, groups$)  
FUNCTION LOCAL AdjustNomadsInfo(gridCtl, column$, rowDel, rowAdd)  
FUNCTION LOCAL BT_RowDel()  
FUNCTION LOCAL BT_RowDown()  
FUNCTION LOCAL BT_RowIns()  
FUNCTION LOCAL BT_RowSearch(*)  
FUNCTION LOCAL BT_RowUp()  
FUNCTION LOCAL ChangeML_GotoLine(*)  
FUNCTION LOCAL ClearNomadsInfo(gridCtl)  
FUNCTION LOCAL CloneNomadsInfo(gridCtl)  
FUNCTION LOCAL CloseSearchWindow()  
FUNCTION LOCAL DoColumnChange(gridCtl, col$, value$)  
FUNCTION LOCAL DoSave(gridCtl, row, oldRow)  
FUNCTION LOCAL PERFORM DoSearch()  
FUNCTION LOCAL FindNextCell(gridCtl, curRow, curCol, newRow, newCol)  
FUNCTION LOCAL FormatDate$(date$)  
FUNCTION LOCAL FormatRow(gridCtl, Row)  
FUNCTION LOCAL GetRowLockState(gridCtl, row, propVars$, propVals$)  

Function will return the 'LOCK value of each column in the row, in the propVals$ variable. These two strings can be saved and used later in the SetRowLockState() method

ParameterDescription
gridCtl [input, numeric] Control ID for the grid to be used
row [input, numeric] Row number to retrieve the lock state for
propVars$ [output, string] Returns a comma separated list of COLUMN$ and LOCK a pair for each column in the row.
propVals$ [output, string] Returns a SEP separated list of values for the above variable containing column name and lock value
Returns [boolean] True if string was able to be returned, False if not the MainGridCtl or there are no columns.
FUNCTION LOCAL GetWdwForCtl(controlID)  
FUNCTION LOCAL HasRowChanged(gridCtl)  
FUNCTION LOCAL IsColumnHidden(column$)  

Function will check if the specified column is hidden

ParameterDescription
column$ [input, string] Column name
Returns [boolean] True if column is hidden, False if column is not hidden.
FUNCTION LOCAL IsCtlGrid(ObjCtl)  
FUNCTION LOCAL OpenSearchWindow()  
FUNCTION LOCAL PERFORM PaintCell()  
FUNCTION LOCAL ParseIOList$(IOL$)  
FUNCTION LOCAL ParseRowTag$(TagtoFind$, Tag$)  
FUNCTION LOCAL PopulateGridBindings(grid$, screen$)  
FUNCTION LOCAL PutTick(gridCtl, column$)  
FUNCTION LOCAL RemoveGridCustomization()  
FUNCTION LOCAL RemoveNomadsInfo(gridCtl, column$)  
FUNCTION LOCAL RemoveNomadsInfo(gridCtl, column$, row)  
FUNCTION LOCAL ResetSecInitPropLists()  
FUNCTION LOCAL PERFORM ResolveFormatters()  
FUNCTION LOCAL ResolveGroups(gridCtl, groups$, fields$)  
FUNCTION LOCAL RestoreGridAutoComplete(mainGridCtl, secGridCtl)  

If the auto-complete object was dropped by _winproc, reinstantiate it and reload auto-complete definition

ParameterDescription
mainGridCtl [input, numeric] Ctl of main grid control
secGridCtl [input, numeric] Ctl of secondary grid control
Returns [boolean] Success or failure
FUNCTION LOCAL RestoreNomadsInfo(gridctl)  
FUNCTION LOCAL ReturnToField(gridCtl, field$)  
FUNCTION LOCAL SetButtonState(gridCtl)  
FUNCTION LOCAL SetButtonStateFirstRow(gridCtl)  
FUNCTION LOCAL SetButtonStateInsertRow(gridCtl)  
FUNCTION LOCAL SetButtonStateLastRow(gridCtl)  
FUNCTION LOCAL SetButtonStateNoRow(gridCtl)  
FUNCTION LOCAL SetButtonStateOtherRow(gridCtl)  
FUNCTION LOCAL SetColumnGroupState(gridCtl, group$, action, row)  
FUNCTION LOCAL SetColumnGroupState(gridCtl, group$, action$, row)  
FUNCTION LOCAL SetColumnState(gridCtl, col$, action, row)  
FUNCTION LOCAL SetGridAutoComplete(cellType$, autoCompName$, colName$, gridLoc$, mainGridCtl, secGridCtl, attributes$)  

Set up auto-complete for grid cell. Load auto-complete definition and set grid cell attributes.

ParameterDescription
cellType$ [input, string] Grid cell control type
autoCompName$ [input, string] Auto-complete name in grid cell
colName$ [input, string] Alias variable name
gridLoc$ [input, string] Grid cell location - P for primary or S for secondary
mainGridCtl [input, numeric] Ctl of main grid control
secGridCtl [input, numeric] Ctl of secondary grid control
attributes$ [input/output, string] Grid cell attributes
Returns [boolean] Success if auto-complete setup was successful or grid cell has no auto-complete, Failure if steup was not successful
FUNCTION LOCAL SetGridAutoComplete(gridCtl, autoCompId$, col$, rowNo)  

Add auto-complete to simple grids. Where the row & column are specified

ParameterDescription
gridCtl [input, integer] Control value of the grid to add the autocomplete too
autoCompId$ [input, string] Name of the auto-complete definition to be set to the particular cell
col$ [input, string] column name to add auto-complete too
rowNo [input, integer] row number to add the auto-complete too
Returns [boolean]
ValueDescription
retSUCCESS(1) if auto-complete successfully added
retFAILURE(0) if auto-complete addition failed
FUNCTION LOCAL PERFORM SetGridHeaders()  
FUNCTION LOCAL PERFORM SetGridIOLISTS()  
FUNCTION LOCAL SetGridSecurity(gridCtl, secgridCtl)  
FUNCTION LOCAL SetGridSecurity(gridCtl)  
FUNCTION LOCAL SetGridSize(gridCtl, secgridCtl)  
FUNCTION LOCAL SetGridSize(gridCtl)  
FUNCTION LOCAL SetLocalGridVariables(gridCtl, Action$)  
FUNCTION LOCAL SetPopupStatus(gridCtl)  
FUNCTION LOCAL SetRowLockState(gridCtl, row, propVars$, propVals$)  

Function will set the 'LOCK value of each column in the row, using the propVals$ variable. These two strings can be saved and used later in the SetRowLockState() method

ParameterDescription
gridCtl [input, numeric] Control ID for the grid to be used
row [input, numeric] Row number to retrieve the lock state for
propVars$ [output, string] Returns a comma separated list of COLUMN$ and LOCK a pair for each column in the row.
propVals$ [output, string] Returns a SEP separated list of values for the above variable containing column name and lock value
Returns [boolean] True if string was able to be returned, False if not the MainGridCtl or there are no columns.
FUNCTION LOCAL SetRowState(gridCtl, group$, rowNo)  
FUNCTION LOCAL SetupNomadsInfo(gridCtl, column$, class$)  
FUNCTION LOCAL SetupNomadsInfo(gridCtl, column$, class$, row)  
FUNCTION LOCAL ShowSearchResult(gridctl, rowNo, column$)  
FUNCTION LOCAL TestAutoCompleteObj()  

Test if cAutoCompleteObjID is the handle to SY_Gridac. Set cAutoCompleteObjID to 0 if it isn't. _winproc may have dropped the object.

Returns [boolean] Success

Properties inherited from: SY_Constant

retFAILURE, retSUCCESS, retNEW, retWARNING, retCANCEL, retYES, retNO, msgYES$, msgNO$, msgCANCEL$, msgOK$, msgRETRY$, msgABORT$, msgIGNORE$, msgNOTONFILE$, msgTIMEOUT$, msgDISABLE, msgACTIVE, msgLinkHELP$, msgLinkMSG$, isFALSE, isTRUE, isYES$, isNO$, isBUSY$, edtNONE, edtEXISTS, edtNEW, ctlDISABLE, ctlENABLE, ctlSHOW, ctlHIDE, ctlLOCK, ctlUNLOCK, ctlLOCKORDISABLE, ctlUNLOCKORENABLE, popHIDE, popDISABLE, popSHOW, popSHOWCHECKED, grdMODEVIEW, grdMODEMAINT, grdMODEADD, filCREATE, filLOCK, filCREATELOCK, filGLOBAL, filCREATEGLOBAL, filLOCKGLOBAL, filCREATELOCKGLOBAL, filCHANNEL, filRAW, filPURGE, filLOAD, filINPUT, filNOOBJECT, filPVX, filREFRESH, filPVX4$, filPVX5$, pthCOMPANY$, pthOTHERCOMPANY$, pthPRCOMPANY$, pthOTHERPRCOMPANY$, pthSYSTEM$, pthUSER$, pthSOA$, pthHOME$, pthROOT$, pthDICTIONARY$, pthTEXTOUT$, pthLOCK$, pthLOCKSYS$, pthPREFIX$, pthARCHIVE$, pthLOGFILES$, folderCOMMONPROGRAMFILES, folderCOMMONAPPLICATIONDATA, errOBJECT, errSYSTEMLOCK, errCONTINUE, errEMBEDDEDIO, errSYSLOCK, extSQLCREATETABLE$, extSQLALLOWNULLDATES$, dbALL$, dbNONE$, dateTOSTRINGFORMAT$, dateLONGMASK$, dateSHORTFMT, dateLONGFMT, dateYEARFIRST, dateMONTHFIRST, dateDAYFIRST, timeMINUTESMASK$, timeMINUTES24MASK$, timeSECONDSMASK$, timeSECONDS24MASK$, idxPRIMARY$, idxBATCH$, idxDISPLAY$, dirFIRST, dirLAST, dirNEXT, dirPREVIOUS, typALPHANUM, typZEROFILL, typCHARNUM, typMASTERNUM, typALPHANUMNF, typMASTERNUMC, typALPHA$, typNUMBERS$, typALPHANUM$, typALPHANUMNF$, typCHARNUM$, typMASTERNUM$, typMASTERNUMCLEN, modTASKOTFDISALLOW$, logALLACTIVITY$, logACTIVITY$, logERROR$, logACTNEWCUSTOMER$, logACTDATASYNC$, logACTDATAIMPORT$, logACTOPTIONCHANGED$, logACTPROGRAMLAUNCH$, logDFDM$, logSECURITY$, logTASKSCHEDULER$, logWEBERROR$, logVISUALINTEGRATOR$, logEntryIDLength, chkOFF$, chkON$, chkGRAYED$, secVIEWONLY, secCREATEONLY, secMODIFYONLY, secCREATEMODIFY, secDELETEONLY, secCREATEDELETE, secMODIFYDELETE, secFULLACCESS, secDEFAULTUSER$, secDEFAULTROLE$, regHKEY_CLASSES_ROOT, regHKEY_CURRENT_USER, regHKEY_LOCAL_MACHINE, regHKEY_USERS, regHKEY_CURRENT_CONFIG, regODBC_PATH$, regMAS_PATH$, E3_MYHANDLE, E3_TASK, E3_QUIT, E3_COCHANGE, E3_DATECHANGE, E3_USERCHANGE, E3_SRVRPATH, E3_HELPFILE, E3_TECHSUPPORT, E3_QUERYTOQUIT, E3_SUPERVISOR, E3_CUSTOMIZE, E3_SWITCHMODULE, E3_DISABLEWIN, E3_CURSOR, E3_USERID, E3_PRIVATETASK, E3_CHAT, E3_BROADCAST, E3_RELOAD, E3_PASSTHROUGH, E3_EXECUTE, E3_EXPCOCHANGE, E3_EXPTASK, E3_EXPLAUNCH, E3_SILENT, E3_DIRECT, E3_NODELIST, E3_OCXITEM, E3_MODULEID, E3_CUSTFAV, E3_HOMEPAGE, E3_MINIMIZE, E3_UNDOCKED, E3_DOCKED, E3_PUBLICTASK, E3_LAUNCHURL, E3_BTNCHANGE, E3_STDBTNRELOAD, E3_MYBUSINESS, E3_REGLOADED, E3_LOADED, E3_V4TASK, E3_PUBMODIFY, E3_TASKRELOAD, E3_SETAUTOHIDE, E3_COCHANGE2, E3_TASK_NC, E3_V4TASK_NC, E3_TASK_ALTC, E3_V4TASK_ALTC, E3_PASSWORD, E3_LAUNCHVIEW, E3_LAUNCHBIETASK, E3_CLEANUPBIE, E3_STARTVIEW, E3_BIE_ADMIN, E3_HELPPATH, E3_CUSTOMERID, E3_MASVERSION, E3_LAUNCHEMBEDDED, E3_LAUNCHERMENU, E3_APP_POINTSIZE, E3_LAUNCHERVERSION, E3_DISABLE, E3_ENABLE, E3_SHOW, E3_HIDE, E3_REFRESH, E3_LIBMASTER, WM_COPY, wtsINITIALPROGRAM, wtsAPPLICATIONNAME, wtsWORKINGDIRECTORY, wtsOEMID, wtsSESSIONID, wtsUSERNAME, wtsWINSTATIONNAME, wtsDOMAINNAME, wtsCONNECTSTATE, wtsCLIENTBUILDNUMBER, wtsCLIENTNAME, wtsCLIENTDIRECTORY, wtsCLIENTPRODUCTID, wtsCLIENTHARDWAREID, wtsCLIENTADDRESS, wtsCLIENTDISPLAY, wtsCLIENTPROTOCOLTYPE, thmNORMAL, thmMETAL, thmOLIVE, rptREPORTTYPESTD, rptREPORTTYPELABEL, rptREPORTTYPEMULTCOL, rptISTRUE, rptISFALSE, rptISDEFAULT, rptPORTRAIT, rptLANDSCAPE, rptASCENDING, rptDESCENDING, rptRIGHTALIGN, rptLEFTALIGN, rptHORCENTERALIGN, rptLSSINGLELINE, rptSTSUM, rptSTAVERAGE, rptSTCOUNT, rptDFLTHSPACING, rptDFLTVSPACING, rptDFLTFONTSIZE, rptDFLTLEFT, rptDFLTTOP, rptTWIPSPERCHARW, rptTWIPSPERCHARH, rptSVTREPORTTITLE, rptEDTDISKFILE, rptGCANYVALUE, rptGCDAILY, rptCRDATEFIELD, rptCRDATETIMEFIELD, crEFTCrystalReport, crEFTRichText, crEFTWordForWindows, crEFTExcel, crEFTPortableDocFormat, crEFTHTML32, crEFTHTML40, crEFTExcelRecord, crEFTText, crEFTCharacterSeparatedValues, crEFTTabSeparatedText, crEFTEditableRTF, crEFTXml, crEFTRPTR, crEFTExcelWorkbook, cContextKeyLen1, cContextKeyLen2, cContextKeyLen3, adCmdText, adCmdStoredProc, adClipString, adExecuteNoRecords, adVarChar, adInteger, adParamInput, adParamOutput, adParamInputOutput, adParamReturnValue, adTextNoRecords, adOpenForwardOnly, adOpenStatic, adLockReadOnly, adUseServer, adUseClient, dbTMP$, dbTEMPDB$, dbSYSDB$, dbPVXDDF, dbPVXDB, dbMYSQL, dbADO, dbSQL, LastErrorMsg$, LastErrorNum$, SageCloudAppDesc$, IolNomads$

Methods inherited from: SY_Constant

GetNOMADSIolist$(), MaskString(), RawString(), ClassValidateEMailAddress(), dateTODAY$(), Element$(), fmtMODCODE$(), fmtMODPREFIX$(), PERFORM FunctionBreak(), GetExceptionMsg$(), GetFileName(), GetJobTitles(), GetPrinterProps(), GetRecordCount(), isALPHA(), isDATE(), isNUMERIC(), MsgPath$(), ParseString(), ParseTagField(), Position(), QUO$(), ValidateFormatType()