TDBGrid: Missing OnRecordChange event? 
Author Message
 TDBGrid: Missing OnRecordChange event?

I have often found that when a "really obvious" feature is missing from
Delphi, it is because I'm just trying to do things from the wrong
perspective.  That may be the case now, but the following has me stumped:

I want to have a TDBGrid connected to a Datasource.  When the user changes
rows, I want it to generate an event so I can update something else.  Yet
OnRowChange is nowhere to be found.  Is there some other way of doing this?

Specifics:
The under-lying table contains a field named "message ID".  I have another
component that can take this message ID as a parameter to a public
function.  Whenever the user goes to a new record, I want to call this
function with the new message ID.

Thanks in advance,
-Jim



Wed, 18 Jun 1902 08:00:00 GMT  
 TDBGrid: Missing OnRecordChange event?

Look at the Events for the DataSource.

i.e. OnDataChange

Regards,

Christopher Quest



Quote:

> I want to have a TDBGrid connected to a Datasource.  When the user
changes
> rows, I want it to generate an event so I can update something else.  Yet
> OnRowChange is nowhere to be found.  Is there some other way of doing
this?

> Thanks in advance,
> -Jim



Wed, 18 Jun 1902 08:00:00 GMT  
 TDBGrid: Missing OnRecordChange event?

Quote:

> I have often found that when a "really obvious" feature is missing from
> Delphi, it is because I'm just trying to do things from the wrong
> perspective.  That may be the case now, but the following has me stumped:

> I want to have a TDBGrid connected to a Datasource.  When the user changes
> rows, I want it to generate an event so I can update something else.  Yet
> OnRowChange is nowhere to be found.  Is there some other way of doing this?

> Specifics:
> The under-lying table contains a field named "message ID".  I have another
> component that can take this message ID as a parameter to a public
> function.  Whenever the user goes to a new record, I want to call this
> function with the new message ID.

> Thanks in advance,
> -Jim

Check out the events for the datasource. There are three: OnDataChange,
OnStateChange, and OnUpdateData. This is probably what you are looking
for.

-Mitch



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Q : TDBGrid and Event and Row changing ?

2. VCL TDBGrid row change event

3. DELPHI: Adding key event to TDBGrid

4. How to have 2 different events on Ellipsis button in TDBGrid

5. OnColEnter event TDBGrid, please help

6. HELP! TDBGrid and GetText Event (newbie)

7. How to higlight a row on a TDBGrid using the OnDrawColumnCell event in Delphi2

8. Missing First Two Chars of SQL Memo and Missing SQL Fields

9. Call an event within another event

10. How to get an event when column resized in TDBGrid?

11. ODBC - IDODBC32..DLL missing

12. Data missed in 3-tier applications

 

 
Powered by phpBB® Forum Software