Subject Re: [IBO] Setting currentrow in IB_Grid
Author Helen Borrie
At 11:27 AM 13-07-01 +0000, you wrote:
>When I show a form I want to set the focus to a IB_Grid and in the
>grid to a specific row.
>How do I do this ?
>I can set the focus
> Grid_Adr.SetFocus;
>But how do I set the current row ?
>something like
> Grid_Adr.SetCurrentRow := 5;
>
>Lee


With IB_* controls, don't try to work on the grid, work on the dataset, viz.

..
if MyQuery.BufferRowCount > 4 then
MyQuery.RowNum := 5;

(doesn't work with ib_cursors though - with them you have to call First and then walk through until RowNum=5 - might be 4 - depends on whether the first row is number 1 or number 0 and I don't know the answer to that one!)

I'm curious - why do you want to do this?

Cheers,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________