Ver Mensaje Individual
  #3  
Antiguo 28-06-2004
arc22 arc22 is offline
Registrado
 
Registrado: may 2004
Posts: 9
Reputación: 0
arc22 Va por buen camino
list out of bound

Hola, antes que nada gracias por contestar, te comento que hice algunas modificaciones:

procedure TForm3.Dbgrid1onDblclick(Sender: TObject);
var
i:Integer;
lista: TStrings;
valo:integer;
catselgrid: string;
artselgrid: string;
begin
with DBGrid1.DataSource.DataSet do
begin
lista:= TStringList.Create;
catselgrid:= DBGrid1.SelectedRows.Items[1];
artselgrid:= DBGrid1.SelectedRows.Items[2];
if (Table2.FindKey([catselgrid, artselgrid])) then
begin
valo:= Table2Stock.AsInteger;
for i:=1 to valo do
lista.Add (IntToStr (i));
DBGrid1.Columns[0].PickList:= lista;
lista.Destroy;
end;
end;
end;

pero salta un Error: list index out of bounds.
Hay un limite en la cantidad de compoonentes de la lista ?
siendo que el valor de valo (tope del for que genera la lista) puede llegar a mas de 1.000.
Saludos.
Responder Con Cita