Jump to content
Henry Olive

DBGrid PickList Change

Recommended Posts

Good Day

 

I have a DataSource and  DBGrid in a Form (The other database comp. are in Data Module)

In the DBGrid's first field's PickList has some items

I need to catch dbgrid's first field Change so that i'll fill next fields according to selected items from picklist

I wrote some codes on DBGrid.ColExit event and every thing is OK, but after i select an item from picklist and

hit DOWN key (Next Row) DBGrid.ColExit  doesnt triggered

I Know there is Field On Change Event in Client Dataset's field editor, but i dont want to write code in data module

I solved my problem with OnKeyDown event

if Key = VK_DOWN then DBGrid1ColExit(DBGrid1); 

I thought may be there is a better solution

Thank You

 

 

Share this post


Link to post

You wrote the best solution onChange. With this you might covered some situation. What for the case when instead of key down the user click on the row below or above?

Share this post


Link to post

Thank you Hans

DBGrid.ColExit triggers ONKEYDOWN w/o any problem

I thought if is there any better solution

 

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×