Ver Mensaje Individual
  #1  
Antiguo 05-07-2006
zvf zvf is offline
Miembro
 
Registrado: abr 2006
Posts: 158
Reputación: 19
zvf Va por buen camino
Agregar datos a un string grid

Hola!!

Yo nunca he utilizado un string grid, y no puedo llenarlo de datos, siempre me aparece un access violation.

Tengo lo siguiente:
Código Delphi [-]
   var
   i, j:Integer;
   Str:String;
   TS:TStrings;
 begin
  //LLENO STRING GRID
  Form1.StringGrid1.Cells[0,0]:='1';
  Form1.StringGrid1.Cells[1,0]:='1';
  Form1.StringGrid1.Cells[2,0]:='1';
  Form1.StringGrid1.Cells[3,0]:='1';
  Form1.StringGrid1.Cells[4,0]:='1';
     // Inicializamos
   // initialize
   Str := '';
   // Para cada línea de las selecciondas
   // for selected lines
   for i := (Form1.StringGrid1.Selection.Top) to (Form1.StringGrid1.Selection.Bottom) do
 begin
     /////y comienza el codigo para realizar lo que se tiene que hacer con las filas seleccionadas del StringGrid1

GRACIAS!!
Responder Con Cita