Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread list index on grid out of bounds?
Fri, Nov 24 2017 7:59 AMPermanent Link

kamran

Hi

Just trying to get the contents of a row on a grid.

I get list index out of bounds when using:

"OrderGrid.Rows[RowIndex][ColumnIndex] "

e.g.

showmessage(OrderGrid.Rows[5][1]);

The row 5 and column 1 are  there for sure as I can see them in my grid ?

Have I missed something or am I using the wrong technique to extract this value ?

Thanks

Kamran
Fri, Nov 24 2017 8:20 AMPermanent Link

Matthew Jones

kamran wrote:

> I get list index out of bounds when using:
>
> "OrderGrid.Rows[RowIndex][ColumnIndex] "
>
> e.g.
>
> showmessage(OrderGrid.Rows[5][1]);
>
> The row 5 and column 1 are  there for sure as I can see them in my grid ?
>
> Have I missed something or am I using the wrong technique to extract this value ?

Nothing I can see wrong - are you counting them zero-based indexes?
Is the data coming from a dataset or is it unbound? Maybe a bound grid needs to be accessed from the dataset?

--

Matthew Jones
Fri, Nov 24 2017 8:34 AMPermanent Link

kamran

Hi Matthew

Yes .. It's a grid previously populated by a grid from an edb table.

So my point is if its in the grid surely its in memory and therefore accessible ?

Thanks

Kamran


"Matthew Jones" wrote:

kamran wrote:

> I get list index out of bounds when using:
>
> "OrderGrid.Rows[RowIndex][ColumnIndex] "
>
> e.g.
>
> showmessage(OrderGrid.Rows[5][1]);
>
> The row 5 and column 1 are  there for sure as I can see them in my grid ?
>
> Have I missed something or am I using the wrong technique to extract this value ?

Nothing I can see wrong - are you counting them zero-based indexes?
Is the data coming from a dataset or is it unbound? Maybe a bound grid needs to be accessed from the dataset?

--

Matthew Jones
Fri, Nov 24 2017 1:43 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kamran,

<< So my point is if its in the grid surely its in memory and therefore accessible ? >>

No, not correct.  There are bound grids and un-bound grids, and one cannot be used like the other.  If the grid is bound, then you cannot reference the rows by index.

Tim Young
Elevate Software
www.elevatesoft.com
Image