2

I am having a CXGrid with cxGridTableView, I have some 9 columns out of them some are having cxcomboBox , cxcheckcombobox, cxMemo etc.

The existing grid is Orpheus table and the column is of type TOvcTCComboBox this adds items like this OvcTCComboBox_Name.Items.Add('Name'); How can we achieve this on CXGrid with 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

X_ABCD.SetCombobox(TCXComboBox(OvcTCComboBoxDOSI_Einh_.Properties),'GE',True,DDO_sSPRACHE,'TXT');

Still this is not working, How can this be fixed?

Please help..

userhi
  • 553
  • 1
  • 7
  • 27

1 Answers1

2

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

Freddie Bell
  • 2,186
  • 24
  • 43
  • 1
    I have implemented my SetComboBox procedure by passing the first parameter as `TCxGridColumn` and in the procedure I used the the same above statement you wrote to add items to combobox on grid. – userhi May 15 '19 at 14:11