Subject [IBO] Re: Moving column in a grid
Author Ryan Nilsson-Harding
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?

-Ryan

--- In IBObjects@y..., Helen Borrie <helebor@t...> wrote:
> At 12:11 AM 13-11-02 +0000, you wrote:
> >Thanks for the suggestion Helen,
> >but the .SelectedField property is a read-only property so I can't
> >assign it any value. This was actually what I tried first.
> >
> >Also, I have taken out the
> >...AsString := 'SAMPLE';
> >line of code, so that the only line is the
> >...('QTY').FocusControl;
> >but even that does not work, so I'm assuming it doesn't have
> >anything to do with the first line assigning data to the DESCR
field.
> >
> >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...
>
> Helen