PdfRpt.ColumnsItemsTemplates.BarcodeField.RenderingCell C# (CSharp) Method

RenderingCell() public method

Custom cell's content template as a PdfPCell.
public RenderingCell ( PdfRpt.Core.Contracts.CellAttributes attributes ) : PdfPCell
attributes PdfRpt.Core.Contracts.CellAttributes
return iTextSharp.text.pdf.PdfPCell
        public PdfPCell RenderingCell(CellAttributes attributes)
        {
            var data = FuncHelper.ApplyFormula(attributes.BasicProperties.DisplayFormatFormula, attributes.RowData.Value);
            attributes.RowData.FormattedValue = data;
            var img = _barcode.GetBarcodeImage(data, attributes.SharedData.PdfWriter.DirectContent);
            return new PdfPCell(img)
            {
                PaddingTop = 5,
            };
        }