Cita:
|
Empezado por santiago14
El grid tiene 6 columnas (0 - 6) quiero que estèn deshabilitadas la 0, la 2 y la 6. Las otras tienen que estar habilitadas.
Bueno, gracias de antemano.
Santiago
|
Hola Santiago:
Yo lo hago así:
Código Delphi
[-]
var
opciones : TGridOptions;
begin
if (Sender is TStringGrid) then
begin
opciones := TStringGrid(Sender).Options;
if (ACol = 3) then
begin
System.Include(opciones,goEditing);
TStringGrid(Sender).Options := opciones;
end
else
begin
System.Exclude(opciones, goEditing);
TStringGrid(Sender).Options := opciones;
end;
end;
end;
Solo debes poner algunos if preguntando por las columnas que quieres habilitar.
Debes usar el evento OnSelectCell para que te entregue las columnas.
Saludos.