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
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实现http发送xml文件片段
- Delphi实现毫秒级别的倒计时实例代码
- Delphi7中Listview的常用功能汇总
- 插件管理框架 for Delphi(一)
- delphi中一个值得大家来考虑的DLL问题
- Delphi实现检测并枚举系统安装的打印机的方法
- delphi 正弦曲线图
- Delphi下OpenGL2d绘图之画四边形的方法
- Delphi实现木马文件传输代码实例
- delphi建立、读取、存贮INI文件的方法《三》
- Delphi控件ListView的属性及使用方法详解
- delphi制作wav文件的方法
- Delphi下OpenGL2d绘图之画点的方法
- Delphi下OpenGL2d绘图之初始化流程详解
- Delphi实现窗体感知鼠标滑过并自动隐藏与显示窗口的方法
- Delphi实现截屏存盘的方法
- Delphi实现碰撞球体完整实例代码
- delphi建立、读取、存贮INI文件的方法《二》
- Delphi解析FTP地址的方法
- Delphi实现读取系统时间与日期完整实例