procedure TUniForm1.LoadDatatoStringGrid(ADODB:TADODataSet;StrGrid:TUniStringGrid);
var
i,j,col,Lin: Integer;
Begin
StrGrid.RowCount:=ADODB.RecordCount+1;
StrGrid.ColCount:=ADODB.FieldCount;
For Col := 0 To ADODB.FieldCount-1 Do
StrGrid.Cells[Col,0] := ADODB.Fields[Col].FieldName;
Lin := 0;
While Not ADODB.Eof Do
Begin
For Col := 0 To ADODB.FieldCount-1 Do
StrGrid.Cells[Col,Lin+StrGrid.FixedRows] := ADODB.Fields[Col].AsString;
ADODB.Next;
Inc(Lin);
End;
ADODB.close;
end;
I use this procedure, but if I load data from different Adodataset to stringgrid, it replace previous data ( start from row 1 again) . I want to make it continue the row from the previous data...
Version 1.90.1552 delphi rad 10.4
please help..