I can do it at design-time but when I try ...
MyDBGrid.Columns[3].ReadOnly := True;
at run-time ... it don't work :o(
Malcolm
The Columns array is zero based. Are you sure that the grid has four
columns?
--
Bill
At runtime you need to set the Readonly property of the Tfield the Tcolumn is
attached to.
--
Brian Bushay (TeamB)
Bbu...@NMPLS.com
Malcolm
I have tried your suggestion but can't work out the syntax.
In my manual there is an example on page 19-13:
CustomerCityStateZip.ReadOnly := True;
but when I use the equivalent it comes up Undeclared Identifier.
My Table is "DiveSheetsTable" and my Field is "Board". The Grid Index
is 3 (the fourth of five columns)
As neither of the following is valid
DiveSheetsTableBoard.ReadOnly := True;
DiveSheetsTable.Board.ReadOnly := True;
What do you think is the correct syntax?
Malcolm
Alfred.
"Malcolm" <malc...@blueyonder.co.invalid> schreef in bericht
news:3af7a23b$1_2@dnews...
> DiveSheetsTable.Fields[3].ReadOnly := False;
Thanks, just managed to get that working after all. :o)
Still not sure why it wouldn't do it before. :o(
Many thanks
Malcolm
Hope this shines a little light on your question.
Alfred.
"Malcolm" <malc...@blueyonder.co.invalid> schreef in bericht
news:3af86e8f_1@dnews...
>My Table is "DiveSheetsTable" and my Field is "Board". The Grid Index
>is 3 (the fourth of five columns)
>As neither of the following is valid
> DiveSheetsTableBoard.ReadOnly := True;
> DiveSheetsTable.Board.ReadOnly := True;
>What do you think is the correct syntax?
DiveSheetsTable.fieldbyName('Board').ReadOnly := True;