Hola.
Entonces sólo agrega los demás campos al código que publiqué inicialmente (1).
Código Delphi
[-]
var
j: Integer;
begin
FDQuery.Close;
FDQuery.SQL.Text := 'SELECT COUNT(*) AS CONT FROM detalle_venta';
FDQuery.Active := True;
StringGrid1.RowCount := FDQuery.FieldByName('CONT').AsInteger;
FDQuery.Close;
FDQuery.SQL.Clear;
FDQuery.SQL.Add('SELECT can_det, esp_det, tip_det, alt_det, anc_det, lar_det FROM detalle_venta');
FDQuery.SQL.Add('WHERE id_ven_det = :ID_DETS');
FDQuery.ParamByName('ID_DETS').AsInteger := ID_VENTA;
FDQuery.Active := True;
j := StringGrid1.FixedRows;
while not FDQuery.Eof do
begin
StringGrid1.Cells[0, j] := FDQuery.FieldByName('can_det').AsString;
StringGrid1.Cells[1, j] := FDQuery.FieldByName('esp_det').AsString; StringGrid1.Cells[2, j] := FDQuery.FieldByName('tip_det').AsString;
StringGrid1.Cells[3, j] := FDQuery.FieldByName('alt_det').AsString;
StringGrid1.Cells[4, j] := FDQuery.FieldByName('anc_det').AsString;
StringGrid1.Cells[5, j] := FDQuery.FieldByName('lar_det').AsString;
FDQuery.Next;
Inc(j);
end;
...
Y claro, cambia los nombres "StringGrid1" y "FDQuery" por tus nombres de StringGrid y FDQuery respectivamente.
Saludos