DBGRIDEH uses Summary (1)

xiaoxiao2021-03-06  91

DBGRIDEH is a very good control inside EHLIB3.5. Because of the first use, it is necessary to write some problems and experience.

(1) Control whether a cell is allowed to edit (or text selection), you can set the grid's Options's DGEDITING attribute; if the property is false, then the user can only select the cell and cannot select the content, and cannot be performed edit.

(2) Grid has an editorMode property is very easy to use. When the user clicks the unit, set the property to true, you can automatically enter the editing state.

example:

Procedure TFRM_MB_TEMPLATE.DBG1CELLCLICK (Column: Tcolumneh);

Begin

IF column.readonly then

Begin

DBG1.Options: = dbg1.options- [dgedity];

DBG1.EDITORMODE: = FALSE;

end

Else Begin

DBG1.Options: = DBG1.Options [DGEDITING];

DBG1.EDITORMODE: = TRUE;

END;

END;

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

New Post(0)