Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GRID INDEX OUT OF RANGE - What is that?

1,495 views
Skip to first unread message

Timothy J. Kelly

unread,
Oct 24, 1997, 3:00:00 AM10/24/97
to

Manuel Carreira wrote:
>
> I receive this error frequently when i am changing an Index in a Paradox
> Table, but i don't understand why.
> The message is:
>
> - 'EInvalidGridOperation. Grid Index Out of Range.'
>
> Is there someone who knows the answer?
>
> m.car...@mail.telepac.pt
I got rid of that error by using DBGrid1.HandleNeeded in my Form1.Create
handler....

Manuel Carreira

unread,
Oct 25, 1997, 3:00:00 AM10/25/97
to

Bruce Irwin

unread,
Oct 26, 1997, 2:00:00 AM10/26/97
to

If you are using D3 get D3.01. There is a problem with the BDE 4.0. BDE
4.01 fixes it

Timothy J. Kelly <tj...@voyager.net> wrote in article
<345143...@voyager.net>...

Ajay Wadhia / Bunty

unread,
Oct 27, 1997, 3:00:00 AM10/27/97
to

Disabledatacontrols of the datasource of the ttable (index of which u r
changing) before changing the index.
Then after u have changed the index enablecontrols of the datasource.
This solves this problem in few specific cases with the same problem.
regards

Ajay /Bunty

Manuel Carreira

unread,
Oct 27, 1997, 3:00:00 AM10/27/97
to

Thank you for your advice, but i don't understand how to do that.
I found that the problem arrived when i used the DBGRID Column Editor. When i
defined only two or less fields in a table with several fields i got allways
the error. When i defined 3 or more fields the problem disappeared.
I found a possible solution in 'Delphi 2.0 BUG LIST', and it was necessary to
modify the method TCustomDbGrid.UpdateActive (in the unit DbGrids) like this
way:

Instead of the line
if Row <> NewRow then
I wrote:

If (Row<>NewRow) and (NewRow < RowCount) then

I tried that and the problem disappeared, but i got several 'Access
Violations' instead.
I think it is wise not to define columns in the DbGrid Column Editor. Instead
i prefer to use the property 'Visible' and the problem doesn't occur.

Manuel Carreira

unread,
Oct 27, 1997, 3:00:00 AM10/27/97
to bun...@hotmail.com

I used DisableControls but the problem persisted. I tried another thing.
Please read the answer i gave to Thimothy J. Kelly.
Thanks!


Ajay Wadhia / Bunty wrote:

> Disabledatacontrols of the datasource of the ttable (index of which u r
> changing) before changing the index.
> Then after u have changed the index enablecontrols of the datasource.
> This solves this problem in few specific cases with the same problem.
> regards
>
> Ajay /Bunty
>
> Bruce Irwin wrote:
>
> > If you are using D3 get D3.01. There is a problem with the BDE 4.0.
> > BDE
> > 4.01 fixes it
> >
> > Timothy J. Kelly <tj...@voyager.net> wrote in article
> > <345143...@voyager.net>...

Ajay Wadhia / Bunty

unread,
Oct 27, 1997, 3:00:00 AM10/27/97
to Manuel Carreira

First Kindly tell me
1 .if the dataset in the dbgrid is connected to some Master table using
Masterdatasource property and it is using the current index which u r
trying to change for some specific purpose.
2. the dataset u have connected to the dbgrid is actually a lookup data
source for some other field or table somewhere ( i.e. in some other
table u have created .a lookup field using this table as lookup table)

or both of the above are true.

Regards

0 new messages