DBGrid: Record-Change-Event instead of CellClick 
Author Message
 DBGrid: Record-Change-Event instead of CellClick

Hi folks,

I am using the DBGrid and need to get notified when the selected record
is changed. Until now I was using the event OnCellClick. But I learned
that this event only covers the "traditional click with the left
mousebutton or cursors". But if I scroll by using the right mousebutton
or the scrollbar no event is raised. The event OnColExit doesn't match
either because this event doesn't take care of the cursor on the
keyboard or the scrollbar.

Does anyone of you already found out a reliable way of getting the
record-change??? Any help would be greatly appreciated!

Thanks in advance,

Matt

Sent via Deja.com http://www.***.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 DBGrid: Record-Change-Event instead of CellClick



Quote:
> I am using the DBGrid and need to get notified when the selected record
> is changed.
> Does anyone of you already found out a reliable way of getting the
> record-change??? Any help would be greatly appreciated!

Use the DataSet's (e.g. TTable) AfterScroll event.

Finn Tolderlund



Wed, 18 Jun 1902 08:00:00 GMT
 DBGrid: Record-Change-Event instead of CellClick
Hello,

you can also use DataSource1.OnDataChange event. Beware that this event
fires with the first creation of the form containing DBComponents.
Therefore it is a good habit to have a 'allowdatachangefire' boolean to
control when the event content should be able to execute.
Also this is useful for 'switcing off' the event under certain circumstances
like incremental search and so on, for increasing the speed of the search.
That is, if you have some heavy stuff in the event.

:)
Kai Inge



Quote:
> Hi folks,

> I am using the DBGrid and need to get notified when the selected record
> is changed. Until now I was using the event OnCellClick. But I learned
> that this event only covers the "traditional click with the left
> mousebutton or cursors". But if I scroll by using the right mousebutton
> or the scrollbar no event is raised. The event OnColExit doesn't match
> either because this event doesn't take care of the cursor on the
> keyboard or the scrollbar.

> Does anyone of you already found out a reliable way of getting the
> record-change??? Any help would be greatly appreciated!

> Thanks in advance,

> Matt

> Sent via Deja.com http://www.deja.com/
> Before you buy.



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

 Relevant Pages 

1. DBGrid: any event trapping for row change?

2. Record Change Event

3. get an event if my record changes

4. Is there an event when you change records?

5. Is there an event when you change records?

6. Record change event?

7. D1-Oracle-Tquery-Dbgrid edit gives 'couldnt perform edit cos another user changed record

8. SQL Task inserts same record multiple times instead going to next record

9. Change event not reflecting the change in text of the DBCombo control

10. ADO WillChangeField event: can't cancel change by changing adStatus

11. VB6 -DBgrid question - Bar instead of a Cell

12. String field in DBGrid not changed, but change is loged in Delta


 
Powered by phpBB® Forum Software