#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0

    TcxDBLookupComboBox how to use it?


    Hi guys I started Delphi not long time ago. Could you please help me with how to use TcxDBLookupComboBox?

    I kind of don't understand if it is for two different datasources or just one?

    My idea is
    Code:
    //To show customers name
    lookupcombo.databinding.datafield:= 'customer_name';
    lookupcombo.databinding.datasource := customersSrc;
    
    and connect different source to join records on a ID field in customersSrc?
    
    lookupcombo.properties.ListColumns... add some columns
    lookupcombo.properties.listsource := customersOrdersSrc;
    //Lock the customer_id in customerSrc on customer_id in CusomersOrdersSrc
    lookupcombo.properties.listFieldIndex:= 'customer_id';
    is this the way is suppose to work??

    Thank you in advance
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,055
    Rep Power
    383
    Yes. Two datasources.
    One for the table you are editing and one (listsource) for the table (view, query) that
    will populate the drop down list.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by clivew
    Yes. Two datasources.
    One for the table you are editing and one (listsource) for the table (view, query) that
    will populate the drop down list.
    Thank you very much, and the above is actually not working for me could you give me a hint?
    Also just to make sure so the
    Code:
    lookupcombo.properties.listFieldIndex:= 'customer_id';
    is to lock index of the two tables is it?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,055
    Rep Power
    383
    I don't use the DevExpress component myself.
    I was just able to answer the first question from generic knowledge of how
    DBLookupCombos work.

    I do not want to mislead you about specifics.
    I would think DevExpress has a forum somewhere where you should get a more authoritative answer.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by clivew
    I don't use the DevExpress component myself.
    I was just able to answer the first question from generic knowledge of how
    DBLookupCombos work.

    I do not want to mislead you about specifics.
    I would think DevExpress has a forum somewhere where you should get a more authoritative answer.
    OK no prob. thank you anyway...

IMN logo majestic logo threadwatch logo seochat tools logo