一、数据录入
1、 在TcxGridDBTableView中,设定属性
NewItemRow.Visible = True
2 、在cxgrid中输入数据怎样回车换行
在TcxGridDBTableView中设置属性
OptionsBehavior.FocusFirstCellOnNewRecord = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
就可以了.如果愿意也可以添加其自带的操作按钮,OptionsView.Navigator = True随后在NavigatorButtons属性中做微调。
3 、使用TcxGridDBCardView录入时,一些属性不一样,此时除了修改OptionsBehavior中的属性值外,还要修改
OptionData.Appending=True
,同时要添加其自带的操作按钮,才行。
二、LookUp功能
1 、在cxGrid中使用LookUp功能
在相应的列(TcxGridDBColumn)中将属性
Properties = LookupComboBox
Properties.ListSource = 数据源
Properties.ListFieldNames = 相应字段
Properties.KeyFieldNames = 关键字段