procedure TFormPo.DBGDetPoDrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (Column.Index = 0 )then begin
DBGDetPo.Canvas.FillRect(Rect);
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top,DBGDetPo.DataSource.DataSet.FieldByName('ItemNumber').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('WareHouseCode').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left+50,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('UnitOfMeasure').AsString );
end;
if (Column.Index = 1 )then begin
DBGDetPo.Canvas.FillRect(Rect);
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top,DBGDetPo.DataSource.DataSet.FieldByName('Description').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('QtyOrdered').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left+50,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('QtyReceived').AsString );
end;
if (Column.Index = 3 )then begin
DBGDetPo.Canvas.FillRect(Rect);
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top,DBGDetPo.DataSource.DataSet.FieldByName('UseTax').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left+30,Rect.Top,DBGDetPo.DataSource.DataSet.FieldByName('RequiredDate').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('QtyBckOrdrd').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left+50,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('UnitCost').AsString );
end;
if (Column.Index = 4 )then begin
DBGDetPo.Canvas.FillRect(Rect);
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top,DBGDetPo.DataSource.DataSet.FieldByName('GLAccount').AsString );
DBgDetPo.Canvas.TextOut(Rect.Left,Rect.Top+16,DBGDetPo.DataSource.DataSet.FieldByName('QtyBckOrdrd').AsString );
end;
end;