Thanks Karl, I'd wondered how you copy a TDataset. I'll give this a try. Incidentally I have just tried putting the code in the TDataset OnAfterScroll event, and this appears also to do the trick.
Cheers Jeremy From: "Karl @ Work" <[EMAIL PROTECTED]> To: "'NZ Borland Developers Group - Delphi List'" <[email protected]> Subject: RE: [DUG]: TDBGrid problem Date sent: Wed, 14 Jun 2006 01:30:29 -0400 Send reply to: [EMAIL PROTECTED], NZ Borland Developers Group - Delphi List <[email protected]> <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]> > >> > I have a editor which is built using a TDBGrid component and stores > x,y coordinates in incremental form ie. as deltax, deltay in each > table row. I need to accumulate the deltax,deltay incremental data > stored in the grid in order to plot coordinates of the point > represented by the current table row. > > The following code is called from the Dataset OnDataChange event to do > this accumulation. It does this OK, but has an unfortunate side > effect - it also suppresses the response to any keypress events > effectively preventing editing of the data. > > I'm struggling to find a way of avoiding this problem. Can anyone > help? << > > Create another cds, and within your OnDataChange use CloneCursor(cds1, > False, False), and iterate through that one instead. > > Cheers, > Carl > > _______________________________________________ > Delphi mailing list > [email protected] > http://ns3.123.co.nz/mailman/listinfo/delphi > > =========================================================== Jeremy Walsh National Institute of Water and Atmospheric Research PO Box 8602 Riccarton Christchurch New Zealand 64-3-3437877 Phone 64-3-3485548 Fax [EMAIL PROTECTED] email =========================================================== _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
