EHLIB Control Information 2

xiaoxiao2021-03-06  90

Automatic Packing Net Gray Width to Grid Client Area Setting AutofitColWidths To set the width of the grid to the TRUE to set the width of the client. The MinautofitWidth property determines the minimum width of the grid and the column width will be recalculated. 3D or flat appearance Use the OptionseH property to display / hide fixed 3D framework, cold area, footer, and data lines.

Use the FLAT attribute to set the data grid with a flat mode.

Import / export data from a variety of formats to TDBGRIDEH. EHLIB's function set can export data from DBGRIDEH to Text, CSV, HTML, RTF, XLS, and its internal format. It saves data to stream (TSTREAM object) or file.

Examples Pascal: SaveDBGridEhToExportFile (TDBGridEhExportAsText, DBGridEh1, 'c: /temp/file1.txt',False); C : SaveDBGridEhToExportFile (__ classid (TDBGridEhExportAsText), DBGridEh1, "c: //temp//file1.txt", false);

EHLIB's function set can be imported from Text and its internal format data into DBGRIDEH data set. It can read data from the file or read data to the stream (TSTREAM object).

Other features use the Lookup editor, you can empty (set to null) lookupkeyfield values ​​at runtime. For example, choose the entire text and press the DELETE button.

The cold zone refrigeration is the unconnected area displayed on the left side of the data grid column. Unlike the fixed column, the column of the cold zone can obtain editing focus. You can set the column set on the right by setting the Frozencols property.

Incremental search

TDBGRIDEH allows users to implement specific "increment" searches in the grid column. When the user enters incremental searches, he can display characters and grids, and look for text in the current column. Use DGHINCSEARCH and DGHPREFERINCSEARCH (in the Optionseh option) Operate the search in the data grid. The DGHINCSEARCH value allows incremental searches in the data grid. When you run, you can use the following key to increment search:

Ctrl F - Start incremental search. Ctrl Enter - Find the next match record. Ctrl Shift ENTER - Find the previous match record.

If the dghincsearch in the optionSeh option is read-only, the network will automatically set the increment mode to return to normal mode after the first button and 1.5 seconds. DGHPREFERINCSEARCH Value Decision Grid Setting Auto Increment Search Mode Alternate unit editing during the first button.

Horizontal or vertical scroll bars use VertsctollBar, HorzsctollBar properties to display / hide and track horizontal or vertical scroll bars.

Multiple TDBGRIDEH allows you to select a record, column, and rectangular area on the selected area:

Allow multiple options to affect the following properties:

The DGMultiSelect property in the Options option - Set whether you allow multiple choices.

The DghcleRSerection property in the Options option - setting whether the selected record is cleared when the user moves to the next unit.

The EditActions Properties in the Options option - Settings Users can perform which operations can be performed on the selected record (such as copy, cut, delete, paste, all choice, etc.).

AllowedSelections properties in the Options option - Set the type (such as line, column, rectangular area, etc.) that allow the selected record.

Selection attribute in the Options option - Sets a current multi-select state, selected record, column, or rectangular area, and attributes and functions to access them. Save or restore the hierarchy of the grid and columns from the registry or INI file. TDBGrideh has a regular setting to save and restore networks from the registry or INI file and the hierarchical level:

RESTORECOLUMNSLAYOUT - The order, width, and sort flag of the column are restored from the registry.

RestoreColumnsLayoutini - The order, width, and sort flag of recovered columns from the INI file.

RESTOREGRIDLAYOUT - The order, width, visual, sort flag, sorting index, or rising high from the registry.

RESTOREGRIDLAYOUTINI - The order, width, visual, sort flag, sort index, or rising high from the INI file.

SAVECOLUMNSLAYOUT - Save the order, width, and sort flag to the registry.

SaveColumnsLayoutini - Save the order, width, and sort flag to the INI file.

SaveGridLayout - Save the order, width, visual, sort flag, sort index, or row to the registry.

SaveGridLayoutini - Save the order, width, visual, sort flag, sort index or row to the INI file.

The current version of TDBGRIDEH does not support: this version of TDBGRIDEH does not support the following features:

TDBGRIDEH cannot set high rows of rows in each data window.

TDBGRIDEH cannot work as TreeView. It cannot have nodes and branches.

TDBGRIDEH does not merge the data unit laterally or vertically.

Convert existing TDBGRID components to TDBGRIDEH components:

Although TDBGRIDEH is not inherited from the TCUSTOMDBGRID component, there is still some similar properties in TDBGRIDEH and TDBGRID.

It allows only a little cost to convert existing TDBGRID components to TDBGRIDEH.

You can turn the existing TDBGRID components to TDBGRIDEH as follows:

Open an application containing TDBGRID components in the Delphi IDE.

Set the view mode as a text method (ALT-F12).

if key = VK_RETURN then // Key: Enter begin if (grdDetailData.SelectedIndex = grdDetailData.Columns.Count-1) and not (dgRowSelect in grdDetailData.Options) then BEGIN if (dgEditing in grdDetailData.Options) and (grdDetailData.Row = GrddetAildata.rowcount-1) THEN // Can be edited from table Grid and current cursor focus in the last row acadddetailexecute (self) else begin grddetaildata.row: = grddetAildata.row 1; // change the cursor focus line to the next line (when a new increase, without running phrase grdDetailData.SelectedIndex: = 0 // change the cursor focus column to the first column end; END ELSE BEGIN grdDetailData.SelectedIndex: = grdDetailData.SelectedIndex 1; while grdDetailData.Columns [grdDetailData. SelectedIndex] .ReadOnly do grdDetailData.SelectedIndex: = grdDetailData.SelectedIndex 1; END; key: = 0; end; if key = VK_INSERT then // Insert key: a new record begin acAddDetailExecute (self); key: = 0; End; if key = vk_delete life // DELTE: Delete a record becomecute (self); key: = 0; end; 1, setting the FooterRowCount value of the dbgrideh property is 1; 2. Set the sumlist's Active value of the dbgrideh property is True; 3, set the value of the FOOTER of the column you ask and the value of FVTSUM; 4, run OK! Write when dataset is opened: dbgrideh1.columns [0] .footer.Value: = INTTOSTR (DBGRIDEH1.DATASOURCE.DATASET.Recordcount);

转载请注明原文地址:https://www.9cbs.com/read-124302.html

New Post(0)