Board index » delphi » data-aware controls w/non data-aware

data-aware controls w/non data-aware

Hi,

I have a form with some dbedits and other edits which values are read by
datasource.DataChange event.

If the user changes a dbedit the StateChange event is fired - the state
changes from browse to edit.  I want to change this event if the user
changes the edit - so i can disable the dbnavigator or enable an ok button,
validate fields & so on.

It is probably obvious but I need a little help.

Thanks,

Matthew

 

Re:data-aware controls w/non data-aware


Are you saying that you want to change from browse mode to edit mode if the
user changes the value in a TEdit? If so, add the following code to the
TEdit's OnChange event handler.

if Table1.State = dsBrowse then Table1.Edit;

--
Bill
(TeamB cannot answer questions received via email)

Re:data-aware controls w/non data-aware


Thanks Bill,

If so, add the following code to the

Quote
> TEdit's OnChange event handler.

> if Table1.State = dsBrowse then Table1.Edit;

The problem with this is that the cursor then jumps to the beginning of the
field

Matt

Other Threads