Subject Re: [IBO] Re: Moving column in a grid
Author Helen Borrie
At 02:51 AM 13-11-02 +0000, you wrote:
>Sorry Helen,
>None of the fields are read-only.
>
>The line:
>myGrid.SelectedField := qryOrder.FieldByName('Desc');
>won't even compile, as it says
>"cannot asign to a read-only property"
>
>I'm not sure if I'm misunderstanding you here, but this is what I
>meant when I said read-only. None of my fields are read-only, but
>the actual TIB_Grid property .SelectedField is a read-only property.
>
>Am I totally confused here?

Yes: this is the question I was answering:


> > >I'm a little stumped with this.
> > >Could it be that when .FocusControl is assigned, it is merely
> > >focusing on the grid, instead of the column?
> >
> > No, it should find the column, *provided* of course the column is
> > editable. A read-only column can't get the focus...
> >

So you don't have a read-only column in the equation. Are you sure? What
is the SQL for the dataset?

If you can eliminate this as the cause then somewhere else is something
that is causing FocusControl not to work. I think you still have to look
at ensuring the control has updated the dataset before you call your
FocusControl code that tests a data condition. FocusControl works on the
data in the dataset, not the text depiction in the control...

Helen