alesf76 Posted January 3, 2018 Share Posted January 3, 2018 I was not able to found an example for a very common case like this: - DataSet1 is an invoice list with a CUSTOMER_ID field - DataSet2 is the curstomer list with an ID field and a DESCRIPTION field I would like to have a dbgrid to edit DataSet1, where the CUSTOMER_ID column is displayed with the DESCRIPTION field looked up from dataset2, and the editor is a dblookupcombobox showing the descriptions from DataSet2 but saving the ID in the CUSTOMER_ID field. Could anyone point me to the right direction ? Link to comment Share on other sites More sharing options...
eustachio Posted February 28, 2018 Share Posted February 28, 2018 You have the demo "DBLookup Combo Editor" online and in the demos Link to comment Share on other sites More sharing options...
Pier Posted March 19, 2020 Share Posted March 19, 2020 eustachio, I have the same problem.... in the demo you mention KeyField=country and ListField=country. Let me try to explai what the original poster and myself want Table1: InvoiceNo:INTEGER(11), CustID:INTEGER(11) - Data (111,1) (222,2) (333,3) (444,1) Table2: ID:INTEGER(11), Customer:CHARACTER(4) - Data (1,'John') (2,'Bill') (3,'Jane') (4,'Mary') The grid should show 111 John 222 Bill 333 Jane 444 John When we click on 'Bill' we should get a combo listing John/Bill/Jane/Mary. If we select Mary the second row in Table1 should become (222,4). How is this achieved? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now