File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10995,13 +10995,24 @@ procedure TMainForm.AnyGridKeyDown(Sender: TObject; var Key: Word; Shift: TShift
1099510995
1099610996procedure TMainForm.AnyGridEditing(Sender: TBaseVirtualTree; Node:
1099710997 PVirtualNode; Column: TColumnIndex; var Allowed: Boolean);
10998+ var
10999+ ColInfo: TTableColumn;
1099811000begin
1099911001 Allowed := False;
1100011002 try
1100111003 if not AnyGridEnsureFullRow(Sender as TVirtualStringTree, Node) then
1100211004 ErrorDialog(_('Could not load full row data.'))
1100311005 else begin
1100411006 Allowed := True;
11007+ if Sender = DataGrid then begin
11008+ ColInfo := SelectedTableColumns.FindByName(Sender.Header.Columns[Column].Text);
11009+ if Assigned(ColInfo) then begin
11010+ Allowed := ColInfo.GenerationExpression.IsEmpty;
11011+ if not Allowed then
11012+ ErrorDialog(f_('Column %s is defined as generated. You cannot edit its content.', [Column.ToString]));
11013+ end;
11014+ end;
11015+
1100511016 // Move Esc shortcut from "Cancel row editing" to "Cancel cell editing"
1100611017 actDataCancelChanges.ShortCut := 0;
1100711018 actDataPostChanges.ShortCut := 0;
You can’t perform that action at this time.
0 commit comments