Home > Back-end >  Delphi CheckComboBox problem, urgent urgent!!!!!!!!!!!!!!
Delphi CheckComboBox problem, urgent urgent!!!!!!!!!!!!!!

Time:10-08

How CheckComboBox description value is saved to the database, rather than save his index to the database, such as
I a drop-down box, I chose Beijing, Shanghai, guangzhou, finally, I put the three value is saved to the database

CodePudding user response:

Then you will index values can be saved to the database

CodePudding user response:

Cx series CheckComboBox is save index, BsskinCheckComboBox is save words

Don't know you use plug-in specific call what,

CheckComboBox1. Items. The Count
CheckComboBox1. Items. Strings [I];
Could be obtained by circulating the

CodePudding user response:

Is like this:

 var 
I: Integer;
The begin
For I:=0 to CheckComboBox. Properties. The Items. Do the Count - 1
The begin
If CheckComboBox. States [I]=cbsChecked then
The begin
ShowMessage (CheckComboBox. Properties. The Items [I] the Description).
end;
end;
end;

CodePudding user response:

Thank you for your help, I need is to get the Description corresponding to the value of the post into the database

CodePudding user response:


Get the value can be saved

CodePudding user response:

The
reference 3 floor kaikai_kk response:
is like this:

Delphi/Pascal code? 1234567891011 var I: Integer; The begin for I:=0 to CheckComboBox. Properties. The Items. Do the begin the Count - 1 if CheckComboBox. States [I]=cbsChecked then begin...

How do I write without cbsChecked this thing? Using TcxCheckComboBox controls, thank you

CodePudding user response:

The
reference 3 floor kaikai_kk response:
is like this:

Delphi/Pascal code? 1234567891011 var I: Integer; The begin for I:=0 to CheckComboBox. Properties. The Items. Do the begin the Count - 1 if CheckComboBox. States [I]=cbsChecked then begin...

Know, to introduce the cxCheckBox

CodePudding user response:

refer to the second floor case5166 response:
cx series CheckComboBox is save index, BsskinCheckComboBox is save words

Don't know you use plug-in specific call what,

CheckComboBox1. Items. The Count
CheckComboBox1. Items. Strings [I];
Could be obtained by circulating the


+ 1

CodePudding user response:

Can hold values the description to the database, also do not need to write code, but you need to do to setup:

One of the control of ActiveProperties EditValueFormat properties, it is the default setting is cvfInteger, modified into cvfCaptions can, so that the control EditValue, will be all checkItem item description and the combination of the selected string,

CodePudding user response:

refer to 7th floor ycongtou response:
Quote: reference kaikai_kk reply: 3/f

Is like this:

Delphi/Pascal code? 1234567891011 var I: Integer; The begin for I:=0 to CheckComboBox. Properties. The Items. Do the begin the Count - 1 if CheckComboBox. States [I]=cbsChecked then begin...

Know, to introduce cxCheckBox


I also report cbsChecked is not defined, this how to deal with, solving
Have the answer please send me email, thanked first
[email protected]

CodePudding user response:

11 references mac_cf response:
Quote: refer to 7th floor ycongtou response:

Quote: refer to the third floor kaikai_kk response:

Is like this:

Delphi/Pascal code? 1234567891011 var I: Integer; The begin for I:=0 to CheckComboBox. Properties. The Items. Do the begin the Count - 1 if CheckComboBox. States [I]=cbsChecked then begin...

Know, to introduce cxCheckBox


I also report cbsChecked is not defined, this how to deal with, solving
Have the answer please send me email, thanked first
[email protected]


Problem has been solved, version control is wrong, I under a DevExpressVCL v55, on d2010 after installation, normal use
  • Related