Class TrDBAction

Unit

Declaration

type TrDBAction = class(TDataModule)

Description

Enabling and showing of Actions depends on TAG value of Active Grid, on UserRights value and on TAG value of each action

TAG value of Actions: format: xyzz x - user rights for non edit actions y - user rights for edit actions zz - bitmask for disable according Dataset state

UserRights value (00 - 99): format: xy x - user rights for non edit actions y - user rights for edit actions disable action if user rights < part of Tag value of Action typical vaules: 1: TOOL actions 2: TOOL and ADD record actions 3: enable TOOL, ADD and EDIT record actions 4: enable TOOL, ADD, EDIT and DELETE Actions

Bitmask for disable each action according Dataset state: 1: Inactive 2: ReadOnly 4: IsEmpty 8: Browse 16: Edit 32: Insert

typical values of Action and states for disabling: ADD record: 0251 (Insert+Edit+ReadOnly+Inactive) EDIT record: 0355 (Insert+Edit+ReadOnly+IsEmpty+Inactive) DELETE record: 0455 (Insert+Edit+ReadOnly+IsEmpty+Inactive) TOOL Button: 1049 (Insert+Edit+Inactive) SAVE or CANCEL record: 0315 (Browse+IsEmpty+ReadOnly+Inactive) EXIT Button: 0048 (Insert+Edit)

TAG value of Grid: (bitmask for hiding Actions according TAG value of Grid) -1: disable all Actions 1: hide whole Edit menu 2: hide whole Sort menu 4: hide whole Filter menu 8: hide whole Columns menu 16: hide whole Props menu 32: dummy 64: dummy 128: hide action acoClose 256: hide action aceDuplic 512: hide action aceSaveAdd 1024: hide action aceAdd 2048: hide action aceEdit 4096: hide action aceDelete 8192: hide action aceAutoEdit

typical values of TAG value of Grid: all actions: 0 not editing: 1 or 3841 only Edit: 3840

Hierarchy

  • TDataModule
  • TrDBAction

Overview

Fields

Public OnRunOtherAction: TRunOtherAction;
Public OnGetOtherActionState: TGetOtherActionState;
Public AutoUpdateState: boolean;
Public AllowSetCellConditions: boolean;
Public AllowSetGridStyle: boolean;

Methods

Public procedure SetActiveGrid(Grid: TrDBGrid);
Public function GetActiveGrid: TrDBGrid;
Public procedure SetUserRights(EditRights: boolean; actRights: integer);
Public procedure AddDBToolMenu(M: TMenuItem);
Public function CheckEditState(ShowDialog: boolean): boolean;
Public procedure CheckShortcut(var Key: Word; Shift: TShiftState);
Public procedure RefreshAction;
Public procedure StoreActiveGrid;
Public procedure RestoreActiveGrid;
Public procedure RelinkActionTo(C: TWinControl; NewDBAction: TrDBAction);
Public procedure OnSetDefaultGridColumns(Sender: TObject);

Description

Fields

Public OnRunOtherAction: TRunOtherAction;
 
Public OnGetOtherActionState: TGetOtherActionState;
 
Public AutoUpdateState: boolean;
 
Public AllowSetCellConditions: boolean;
 
Public AllowSetGridStyle: boolean;
 

Methods

Public procedure SetActiveGrid(Grid: TrDBGrid);
 
Public function GetActiveGrid: TrDBGrid;
 
Public procedure SetUserRights(EditRights: boolean; actRights: integer);
 
Public procedure AddDBToolMenu(M: TMenuItem);
 
Public function CheckEditState(ShowDialog: boolean): boolean;
 
Public procedure CheckShortcut(var Key: Word; Shift: TShiftState);
 
Public procedure RefreshAction;
 
Public procedure StoreActiveGrid;
 
Public procedure RestoreActiveGrid;
 
Public procedure RelinkActionTo(C: TWinControl; NewDBAction: TrDBAction);
 
Public procedure OnSetDefaultGridColumns(Sender: TObject);
 

Generated by PasDoc 0.15.0.