您的位置:首页 > 编程语言 > Delphi

How to allow new records to be inserted, but prevent existing data from being edited

2016-03-23 16:20 567 查看
原文:https://www.devexpress.com/Support/Center/Question/Details/A2911

he solution to your problem is very simple:

 1) Keep the View's OptionsData.Editing option active.

 2) Implement the View's OnEditing event handler as follows:
[Delphi]Open in popup window
procedure <Form>.<View>Editing(Sender: TcxCustomGridTableView;

AItem: TcxCustomGridTableItem; var AAllow: Boolean);

begin

AAllow := Sender.Controller.FocusedRecord.IsNewItemRecord;  // NewItemRow is focused

end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  delphi tcxgrid