procedure TForm1.FormCreate(Sender: TObject);
begin
stringgrid1.Columns.Add;
stringgrid1.Columns.Add;
stringgrid1.Columns[0].ButtonStyle:=cbspicklist;
stringgrid1.Options:=stringgrid1.Options+[goediting];
end;
procedure TForm1.StringGrid1SelectCell(Sender: TObject; aCol, aRow: Integer;
var CanSelect: Boolean);
begin
if (aCol=1) and (aRow<>3) then begin
CanSelect := true;
end;
end;
procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer;
var Editor: TWinControl);
begin
if (aCol=1) and (aRow<>3) then Editor := nil;
end;
Column 0, could not be edited in row 1,2 and 4.
How can stringgrid1.Options:=stringgrid1.Options+[goediting]; work on such cells ?
But stringgrid1.Options:=stringgrid1.Options+[goediting]; worked on column 1.