Grid_List Class Properties and Methods

The Grid_List class is actually not a control class. It’s a container class that contains a grid object based on the Grid_ class. The Grid_List class provides a picklist grid with incremental search and sortable columns that you can place on a form.

Properties

The following table lists the class properties. The properties listed include the standard Visual FoxPro class properties that the VPM Enterprise class uses and the VPM Enterprise custom properties. Where appropriate, the Comments column of the table describes a property and provides suggestions for its use.

Property & Initial Value

Comments

Standard Properties Used:

 

BackStyle = 0

 

BorderWidth = 0

 

Height = 235

 

Name = “grid_list”

 

Width = 351

 

Custom Properties:

 

aFieldCols[1,4]

An array that holds information about each column in the grid. Information is used to enable incremental searching.

cSaveTag = “”

The name of the master tag is saved when the grid receives focus so that it can be used again when the grid loses focus.

cSearchString = “”

Holds the current string used to perform the incremental search.

i_cUse_ID = “”

A two-character ID used by the multilingual functionality to provide for the unique translation of a control’s properties.

i_lOverrideCaption = .F.

Used by the multilingual functionality to bypass the translation of the Caption property value.

i_lOverrideDragIcon = .F.

Used by the multilingual functionality to bypass the translation of the DragIcon property value.

i_lOverrideFont = .F.

Used by the multilingual functionality to bypass the translation of the Font property value.

i_lOverrideRecordSource = .F.

Used by the multilingual functionality to bypass the translation of the RecordSource property value.

i_lOverrideStatusBarText = .F.

Used by the multilingual functionality to bypass the translation of the StatusBarText property value.

i_lOverrideToolTipText = .F.

Used by the multilingual functionality to bypass the translation of the ToolTipText property value.

lFirstSaveChanges = .T.

Used to make sure that some special functionality is only performed the first time the grid receives focus.

lSaveChanges = .T.

Used to make sure the LostFocus method of the container is not run when the container loses focus so that the grid can receive focus.

lSaveTagAscending = .F.

The name of the master tag is saved when the grid receives focus so that it can be used again when the grid loses focus. This property is used to make sure the order is set back to the original ascending/descending setting.

lSearching = .F.

Set to .T. when a search has been initiated.

nActiveCol = 0

Identifies the active column.

nCurrentRec = 0

Holds the record number of the current record. Used to determine when a new row (record) has been selected.

Methods

The following table lists the class methods. The methods listed include the standard Visual FoxPro class methods that the VPM Enterprise class uses and the VPM Enterprise custom methods. Where appropriate, the Comments column of the table describes a method and provides suggestions for its use.

Method

Comments

Standard Methods Used:

 

grdListGrid.AfterRowColChange

Resets the column header when a new column is selected.

Refreshes the form and toolbar when a new record is selected.

grdListGrid.Init

Loads the array aFieldCols, which holds information about each column in the grid to enable incremental searching.

LostFocus

Restores the tag that was in use before the grid received focus.

Custom Methods:

 

HeaderClicked

Toggles the order between ascending and descending.

InterceptKeypress

Performs the incremental search.

Places characters entered into column header caption.

SaveChanges

The user may have made a change to the current record and not yet saved those changes. Those changes should be saved before another record is selected in the List Grid.

SetBackColor

Highlights the selected column and row (record) by changing the BackColor.

 

More:

Grid_Toolbar Class Properties and Methods