Subject Re: [IBO] Editing infopower grids
I have just come across this thread becuase I am having a problem
with an infopower grid being used to display the detail bit of a
master-detail relationship. I have autoediting enabled to allow the
user update info in the grid rows as they wish.

The problem I am having is that when the user moves to another row
the relevant database events appear to fire and it looks like it is
doing a post. However, the database is not updated and the updates
are lost. I deleted the ip grid and used a simple tdbgrid and the
updates work fine.

I am using ip2000, with d5 with the IBODATABASE and IBOTABLE

I did a bit of investigating and I simply cannot understand the
behaviour of the dataset.

The detail's table does have a unique field populated by a generator
and this field is referenced in the keylinks field of the table. I
display the record id in the before and after post events and for
some reason the recordID changes from the recordid of the row being
edited to the recordid of the previous row edited by the user. The
beforepost event shows the correct recordid and the afterpost event
shows the wrong value. When I change to a tdbgrid it works fine.

Would anybody have any suggestions on how to proceed?


Stewart Bourke

--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> Can this be duplicated outside of InfoPower?
> Jason Wharton
> CPS - Mesa AZ
> ----- Original Message -----
> From: "NSI Sadimo" <sadimo@c...>
> To: <>
> Sent: Wednesday, January 03, 2001 12:02 PM
> Subject: Re: [IBO] Editing infopower grids
> > I have the same problem.
> > When displaying the SQL generated I saw that on grids with
multiple lines,
> the
> > SQL generated was for updating the line where the cursor was
> > located eg going from line 3 to 4, the update says "where line =
3" insted
> of
> > "where line = 4".
> > I don't know if it is an Infopower issue or an IBObject one (I
would say
> > since with BDE those things work).
> > The work around I found, is in the BeforePost, BeforeDelete ...
events to
> call
> > locate with the field values eg tblx.Locate('PrimaryKey',
> tblxPrimaryKey.Value
> > []).
> > Could Jason have a look at that ?
> >
> > calvin@t... a écrit :
> >
> > > I'm having problems editing in infopower grids (TwwDBGrid). I'm
> the
> > > TIBOQuery component and the Infopower TwwDataSource component.
> getting
> > > error messages that reads along the line of "Cannot edit
current row".
> I'm
> > > not sure wats going on here and I think I've set all the
settings to
> allow
> > > edits in on the query.
> > >
> > > Calvin