List Index Is Out Of Bounds
Caros.
Segue o trecho dó código.
procedure TFormPrincipal.SpeedDeleteClick(Sender : TObject);
begin
{ Excluir }
if DMform.cdsItem.FieldByName('FLAG_BAIXA').value = '1' then
begin
if Application.Messagebox('Este produto já foi pedido, deseja continuar a exclusão?',
'Informação', MB_ICONINFORMATION + MB_YESNO) = IDno then
Exit;
end;
if Application.MessageBox('Deseja excluir a cotação?',
'Confirmação', MB_ICONQUESTION + MB_YESNO) = IDYES then
begin
begin
DMForm.cdsCota.Delete;
DBNav1.Enabled := True;
DBNav2.Enabled := True;
Inclusao := False;
GrupoCotacao.Enabled := Inclusao;
LimparDados;
end;
PageControl1.ActivePage := tsGridCotacao;
sbMontaQuery.Click;
end;
end;
Gostaria de saber como posso reindexar o índice após a exclusão, tendo em vista que ao final gera o erro "List Index Is Out Of Bounds"?
Obrigado!
Segue o trecho dó código.
procedure TFormPrincipal.SpeedDeleteClick(Sender : TObject);
begin
{ Excluir }
if DMform.cdsItem.FieldByName('FLAG_BAIXA').value = '1' then
begin
if Application.Messagebox('Este produto já foi pedido, deseja continuar a exclusão?',
'Informação', MB_ICONINFORMATION + MB_YESNO) = IDno then
Exit;
end;
if Application.MessageBox('Deseja excluir a cotação?',
'Confirmação', MB_ICONQUESTION + MB_YESNO) = IDYES then
begin
begin
DMForm.cdsCota.Delete;
DBNav1.Enabled := True;
DBNav2.Enabled := True;
Inclusao := False;
GrupoCotacao.Enabled := Inclusao;
LimparDados;
end;
PageControl1.ActivePage := tsGridCotacao;
sbMontaQuery.Click;
end;
end;
Gostaria de saber como posso reindexar o índice após a exclusão, tendo em vista que ao final gera o erro "List Index Is Out Of Bounds"?
Obrigado!
Elton Ésqui
Curtidas 0
Respostas
Marco Salles
05/07/2010
Ola Elton Esqui..
Vc podia ter continuado neste tópico
https://www.devmedia.com.br/forum/delphi/380541-Mudar-cor-da-linha-DBGRID.html
Afinal é uma continuação
GOSTEI 0
Elton Ésqui
05/07/2010
Ok Marco. Obrigado!
Desculpe, é que achei que os assuntos poderiam soar diferente.
Continuaremos lá então.
Valeu
Desculpe, é que achei que os assuntos poderiam soar diferente.
Continuaremos lá então.
Valeu
GOSTEI 0