Link to home
Start Free TrialLog in
Avatar of VENKAT
VENKAT

asked on

Creating Instances of LookupCombo box

I would like to use LookupCombo box with out placing component on my Form, I would like to create using coding only. Actually i have a table which connected to GRID and RVD. So when i execute my RVD from table itself i would like to specify which field will be display as Lookup Combo box. Anybody can help me please?
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Motaz
Motaz

You can create LookupComBox as:

var
  Lookup: TLookupComboBox;
begin
  Lookup:= TLookupCompoBox(Self);
  Lookup.Parent:= Self;
  Lookup.Lef:= 100;
  Lookup.Top:= 50;
  Lookup.Datasource:= Datasource1;
  Lookup.DataField:= 'Subject';
end;

What did you mean by RVD?
Motaz
Avatar of VENKAT

ASKER

hi inthe/Motaz
   i wrote code for my TwwDBLookupCombo as u write. But If i have component on my wwDBGrid, after i assign properties i used to double click the wwDBGrid by open the connected table. Then i can select that FieldName from Selected Field List and can assign ControType='CustomEdit' and ControlName='wwDBLookupCombo1'. So how to do all these thigns here. RVD means wwRecordViewDialog from InfoPower. So later when i edit my wwDBGrid with RVD, i should be able to see that Field with LookupCombo. Thats my wish. I am using all InfoPower componnets.
Thank you.
Avatar of VENKAT

ASKER

Hi Inthe
   Thank u very much. I got Lookup Combo in Grid and RVD aswell. Actually 75% of my problem is solved. Next little bit is Onclick function from this combo. I did not understand ur TAG usefulness. Can u explain me clearly how to do this Onclick and also Tag useful in that. Thank u again.