LookupTable : LkpTableRevenu
Is it possible to display the value of the ACCOUNT_GL and save the ID_COMPTE_GL?
ZenDealer,We represent considerable authority in working with free vendors who treat their business appropriately, and are keen on taking it to the following level.
Our prosperity is straightforwardly and at last estimated by the achievement of the vendors we serve.
Visit Us : https://www.zendealer.com/facebook-marketplace-auto-posting-tool-after-13th-september.html
Contact : (855) 960-1290
Email : firstname.lastname@example.org
I can not modify the value of the field (in the grid) without necessarily opening the component TwwDBLookupComboDlg and select a new value. I would like to be able to modify this value without necessarily opening the component.
The steps I gave are for doing it in the grid field. You can make the TwwDBLookupComboDlg a custom control for the column using the Select Fields Editor (see step 4).
Is it normal for me to use the "TwwDBLookupComboDlg" to change a value. Can not I do it directly in the grid field ?
If your combo is in the grid and you want to display the descriptive field from the lookuptable for all rows, then you need to create a lookupfield in your lookuptable. See the delphi documentation on this.
1) Create a Delphi LookupField in the dataset that is attached to the grid. Have it lookup on your keyfield into the other table and return the other result field you wish to display. Then dvl-click the grid to bring up the Selected Fields editor, and add this field to your grid's list of fields. Run your project first to test if your grid is now showing your lookupfield.
2) Drop a TwwDBLookupCombo or TwwDBLookupComboDlg on your form and set the lookuptable to your lookuptable and the lookupfield to be your keyfield.
3) Double click on the TwwDBLookupCombo or TwwDBLookupComboDlg or click on the selected property and make the first field displayed in the list be the (other field) result field.
4) Double click on the TwwDBGrid's or click on the selected property and attach this control to the lookupfield from step 1
The transaction table contains a GL_CC_REV_ID field that allows you to select a general ledger account
Transaction Table (DsMaster):
ID ... GL_CC_REV_ID
Lookup Table: LKPTableAccount
I would like the component to display the value of the field COUNT_GL "2500" in the grid but save the ID_COMPTE_GL in the field GL_CC_REV_ID.