[英]Delphi Add items to cxcombobox on cxgrid without using oninitpopup event for column
I am having a CXGrid
with cxGridTableView
, I have some 9 columns out of them some are having cxcomboBox
, cxcheckcombobox
, cxMemo
etc. 我有一个
CXGrid
与cxGridTableView
,我有一些9列了出来一些是有cxcomboBox
, cxcheckcombobox
, cxMemo
等。
The existing grid is Orpheus table and the column is of type TOvcTCComboBox this adds items like this OvcTCComboBox_Name.Items.Add('Name');
现有的网格是Orpheus表,列的类型为TOvcTCComboBox,这样就添加了像这样的项目
OvcTCComboBox_Name.Items.Add('Name');
How can we achieve this on CXGrid
with cxGridTableView
我们如何使用
cxGridTableView
在CXGrid
上实现这cxGridTableView
1. procedure SetCombobox(aCombo: TOvcTCComboBox; sTyp: string; bFirst: Bool; sSpr: string; sRetVal: string);
2. procedure SetCombobox(aCombo: TCxComboBox; sTyp: string; bFirst: Bool; sSpr: string; sRetVal: string);
I have changed the procedure declaration from 1 to 2 and called the procedure with parameters as below 我已将过程声明从1更改为2,并使用如下参数调用过程
X_ABCD.SetCombobox(TCXComboBox(OvcTCComboBoxDOSI_Einh_.Properties),'GE',True,DDO_sSPRACHE,'TXT');
Still this is not working, How can this be fixed? 这仍然不起作用,如何解决?
Please help.. 请帮忙..
To answer your first question, you can use this to add items to a bound grid with a combobox in the first column 要回答第一个问题,您可以使用此选项将项目添加到第一列中带有组合框的绑定网格中
TcxComboBoxProperties(cxGrid1DBTableView1Column1.Properties).Items.Add('Item1')
TcxComboBoxProperties(cxGrid1DBTableView1Column1.Properties).Items.Add('Item2')
You'll find you can't directly translate your existing SetCombobox
function, and so your existing code will be affected 您会发现无法直接翻译现有的
SetCombobox
功能,因此您的现有代码将受到影响
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.