Can dbcombobox implement this function, or can other controls implement this function? Online, etc! Development and Application of VCL Components
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061220150549244.html
In dbcombobox?
Show value submission Value
Male 1
Female 0
The displayed value is displayed during selection, but the 0 or 1 type of int type is submitted when the post is submitted;
Dbcombobox is connected to only one data source! You do not need to join other data sources in listdatastore to submit values!
(Note: Only one data source is connected !)
No '~ Even if '~ When you show it?
Events with dataset Fields
Procedure TForm1.ADOQuery1SexGetText (Sender: TField; var Text: string;
DisplayText: Boolean );
Begin
Case Sender. AsInteger
0: Text: = 'female ';
1: Text: = 'male ';
End;
End;
Procedure TForm1.ADOQuery1SexSetText (Sender: TField; const Text: string );
Begin
If Text = 'female' then
Sender. Value: = 0
Else if Text = 'male' then
Sender. Value: = 1;
End;
Thank you! Boss, you answered the same question that I posted! I have to add a score for you!