Ver Mensaje Individual
  #3  
Antiguo 17-03-2008
Northern Northern is offline
Miembro
 
Registrado: ene 2006
Posts: 211
Reputación: 19
Northern Va por buen camino
Tienes este truco de tamaracka:


Código Delphi [-]
 type
  TMyStringGrid = class(TStringGrid);

  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  MyStringGrid: TMyStringGrid;
begin
  // creates a pointer to the stringGrid - do not free or nil;
  // otherwise you will wipe out you stringGrid1;
  MyStringGrid := TMyStringGrid(StringGrid1);
  MyStringGrid.deleteRow(1);
end;

procedure TForm1.FormShow(Sender: TObject);
begin
  StringGrid1.cells[1,1] := 'HELLO1';
  StringGrid1.cells[1,2] := 'HELLO2';
  StringGrid1.cells[1,3] := 'HELLO3';
end;



Saludos
Responder Con Cita