[Lazarus] RE : RE : RE : RE : @DBLookupControls users: call for test
Ludo Brands
ludo.brands at free.fr
Tue Dec 13 10:05:29 CET 2011
> > Sorry, I don't understand what you mean.
> >
>
> In a dataset i have to fields: PreferredFruit and FallbackFruit.
>
> Both are indexed fields that lookup de display value in the
> same dataset
> Fruits
>
> I set the PreferredFruit to 1 (Orange) and FallbackFruit to 2 (Banana)
>
> Where the cursor of dataset Fruits should be?
>
The last one you selected. So, when user selects PreferredFruit, he can look
at the the details of Fruits to help him in selecting the right fruit
(customer hates red fruit and fruit with hard shells, so the user verifies
color and shell type before selecting). Then he selects FallbackFruit. Same
usage, verify Fruits details before selecting FallbackFruit, user is not
interested in the details of Orange anymore.
Your next question: where is the cursor in the dataset Fruits if I change
the cursor in the customer dataset? Answer: Delphi selects the first key
field in the dataset record (the one with lowest fielddefs index or fields
index if no fielddefs). If the user wants another field, an AfterScroll on
the customer dataset can fix that.
Ludo
More information about the Lazarus
mailing list