ADO Database Delphi

procedure TfrmGenListe.grlisteDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
s1, s2 : string;
i1 : integer;
begin
if tblListe.RecordCount = 0 then exit;
i1 := 2;
s1 := column.Field.AsString;
if Column.Index=2 then
s1:=' '+copy(s1,1,5);
if (gdselected in State) or (gdfocused in state) then
grListe.Canvas.Font.Color := clwhite else grliste.Canvas.Font.Color := clblack;
grliste.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top + 2, s1);
end;