Topic: combox

Hello MVD!

Happy New Year to All!

Is there a possible way to have a combobox without a table link?  I need a help and sample. Pls help-Wizards!

Re: combox

Hello.


Yes, an example

procedure Form1_OnShow (Sender: string; Action: string);
begin
   Form1.ComboBox1.Clear; 
   Form1.ComboBox1.dbAddRecord (1, 'Item 1');
   Form1.ComboBox1.dbAddRecord (2, 'Item 2');
end;
Dmitry.

Re: combox

Thank You DriveSoft!

Re: combox

Hello Admin!

How to save this into the table?

Re: combox

Hi Manixs,


Check out the post #1 attachment which may help.
http://myvisualdatabase.com/forum/viewtopic.php?id=3970

It contains these type of combo boxes on frmEmployee. Notice Edit1 and Edit2 textboxes. They are the ones holding combo values in table. I have two of them as I used two combos. Please ignore all the other script mainly relating to font change.
EHW has kindly provided the original solution for me sometimes ago.

Adam
God... please help me become the person my dog thinks I am.

Re: combox

manixs2013 wrote:

Hello Admin!

How to save this into the table?

Actually you can show data in combobox without using script or foreign key. Just specify in the property ForeignKey table name. But you can't save selected item to database, because as you said you don't have foreign key, I think you doing something wrong.

Dmitry.