Friday, 25 May 2018

cxDBLookupComboBox Setting Properties



Setting Properties
DropDownAutoSize = True
DropDownSizeable = True
KeyFieldNames = J_KEY
ListFieldNames = J_KEY;J_BANK;J_CUSTOMER;J_TERMINAL;J_LOCATION
ListSource = datasource


OnCloseUp
procedure Tform1.cxDBLookupComboBox1PropertiesCloseUp(Sender: TObject);
begin
  with TcxDBLookupComboBox(Sender).Properties.Grid.DataController do
  begin

    if not VarIsNull(GetValue(FocusedRecordIndex, 0))then
       qryMainPCM_JOBKEY.AsString:= Values[FocusedRecordIndex, 0];

    if not VarIsNull(GetValue(FocusedRecordIndex, 1))then
       qryMainPCM_BANK.AsString:= GetValue(FocusedRecordIndex, 1);
   
    if not VarIsNull(GetValue(FocusedRecordIndex, 3))then
      qryMainPCM_TERMINAL.AsString := GetValue(FocusedRecordIndex, 3);       //Values[FocusedRecordIndex, 3]; 


    if not VarIsNull(GetValue(FocusedRecordIndex, 4))then
      qryMainPCM_LOCATION.AsString:= Values[FocusedRecordIndex, 4];   
   
  end;

end;

1 comment:

  1. Hi, thank you. How to get this component? I have tryied in the site, but I did not find it.

    ReplyDelete