C# Класс PdfRpt.FluentInterface.ColumnItemsTemplateBuilder

Column Items Template Builder Class.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
Annotation ( Func onPrintAnnotation ) : void

Displaying current cell's data as an annotation.

Barcode ( Barcode value ) : void

Displaying current cell's data as a Barcode.

BasicProperties ( CellBasicProperties data ) : void

Table's Cells Definitions. If you don't set this value, it will be filled by using current template's settings internally.

ByteArrayImage ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void

Displaying current cell's data as an Image.

Checkmark ( System checkmarkFillColor = null, System crossSignFillColor = null ) : void

This item template is useful for displaying Boolean data (true/false) as checkMarks

ConditionalFormatFormula ( Func formula ) : void

Defines the current cell's properties, based on the other cells values. Here IList contains actual row's cells values. It can be null.

CustomTemplate ( IColumnItemsTemplate columnItemsTemplate ) : void

Custom template of the in use property, controls how and what should be rendered in each cell of this column. It can be null. If you don't set it, new DisplayAsText() template will be used automatically.

DisplayFormatFormula ( string>.Func formula ) : void

Fires before each cell of this column is being rendered as a string. Now you have time to manipulate the received object and apply your custom formatting function. It can be null.

Hyperlink ( System foreColor, bool fontUnderline, string textPropertyName = "", string navigationUrlPropertyName = "" ) : void

Displaying current cell's data as a hyperlink

ImageFilePath ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void

Displaying current cell's data as an Image. It's assumed that this data point to the physical image's path on the disk.

InlineField ( Action inlineFieldBuilder ) : void

Defines how to display the current cell's data.

MonthCalendar ( CalendarAttributes data ) : void

Displaying current cell's data as a MonthCalendar. Calendar's cell data type should be CalendarData. Use DaysInfoToCalendarData.MapToCalendarDataList to map list of the DayInfo's to the list of CalendarData's.

PdfTemplate ( string pdfTemplatePath, Action onFillAcroForm ) : void

Using an AcroForm or a simple pdf template file as the Cells template.

ProgressBar ( Func progressBarColorFormula, bool showPercentText ) : void

Displaying current cell's data as text plus a ProgressBar.

ProgressBar ( System progressBarColor, bool showPercentText ) : void

Displaying current cell's data as text plus a ProgressBar.

Symbol ( Func onSelectSymbol ) : void

Displaying the current cell's data as a Zapf Dingbats symbol.

TextBlock ( ) : void

Displaying current cell's data as text.

WingdingsSymbol ( Func onSelectSymbol ) : void

Displaying the current cell's data as a Wingdings symbol.

XHtml ( IList cssFilesPath = null, string inlineCss = "", string imagesRootPath = "" ) : void

Using iTextSharp's HTML to PDF capabilities. This method uses the XmlWorker class of iTextSharp.

Описание методов

Annotation() публичный Метод

Displaying current cell's data as an annotation.
public Annotation ( Func onPrintAnnotation ) : void
onPrintAnnotation Func Return an AnnotationFieldData based on the passed value, which is the actual row's fields values from TableDataSource and CalculatedFieldFormula. If you don't want to add the annotation, return null.
Результат void

Barcode() публичный Метод

Displaying current cell's data as a Barcode.
public Barcode ( Barcode value ) : void
value iTextSharp.text.pdf.Barcode An instance of iTextSharp.text.pdf.BarcodeXYZ
Результат void

BasicProperties() публичный Метод

Table's Cells Definitions. If you don't set this value, it will be filled by using current template's settings internally.
public BasicProperties ( CellBasicProperties data ) : void
data PdfRpt.Core.Contracts.CellBasicProperties
Результат void

ByteArrayImage() публичный Метод

Displaying current cell's data as an Image.
public ByteArrayImage ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void
defaultImageFilePath string Default image will be used in case of null images
fitImages bool Set fitImages to true to fit the image to the cell
cacheImages bool If true, the image bytes will be added to the PDF only once, not per each new instance. Therefore the result won't be a bloated PDF file. Choose this option if there are many similar images in your data source.
Результат void

Checkmark() публичный Метод

This item template is useful for displaying Boolean data (true/false) as checkMarks
public Checkmark ( System checkmarkFillColor = null, System crossSignFillColor = null ) : void
checkmarkFillColor System Checkmark's fill color.
crossSignFillColor System Fill color of the cross sign.
Результат void

ConditionalFormatFormula() публичный Метод

Defines the current cell's properties, based on the other cells values. Here IList contains actual row's cells values. It can be null.
public ConditionalFormatFormula ( Func formula ) : void
formula Func
Результат void

CustomTemplate() публичный Метод

Custom template of the in use property, controls how and what should be rendered in each cell of this column. It can be null. If you don't set it, new DisplayAsText() template will be used automatically.
public CustomTemplate ( IColumnItemsTemplate columnItemsTemplate ) : void
columnItemsTemplate IColumnItemsTemplate
Результат void

DisplayFormatFormula() публичный Метод

Fires before each cell of this column is being rendered as a string. Now you have time to manipulate the received object and apply your custom formatting function. It can be null.
public DisplayFormatFormula ( string>.Func formula ) : void
formula string>.Func
Результат void

Hyperlink() публичный Метод

Displaying current cell's data as a hyperlink
public Hyperlink ( System foreColor, bool fontUnderline, string textPropertyName = "", string navigationUrlPropertyName = "" ) : void
foreColor System
fontUnderline bool
textPropertyName string If you don't set TextPropertyName, current cell's text will be used as hyperlink's text.
navigationUrlPropertyName string If you don't set NavigationUrlPropertyName, current cell's text will be used as hyperlink's target url.
Результат void

ImageFilePath() публичный Метод

Displaying current cell's data as an Image. It's assumed that this data point to the physical image's path on the disk.
public ImageFilePath ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void
defaultImageFilePath string Default image will be used in case of missing images
fitImages bool Set fitImages to true to fit the image to the cell
cacheImages bool If true, the image bytes will be added to the PDF only once, not per each new instance. Therefore the result won't be a bloated PDF file. Choose this option if there are many similar images in your data source.
Результат void

InlineField() публичный Метод

Defines how to display the current cell's data.
public InlineField ( Action inlineFieldBuilder ) : void
inlineFieldBuilder Action Defines how to display the current cell's data.
Результат void

MonthCalendar() публичный Метод

Displaying current cell's data as a MonthCalendar. Calendar's cell data type should be CalendarData. Use DaysInfoToCalendarData.MapToCalendarDataList to map list of the DayInfo's to the list of CalendarData's.
public MonthCalendar ( CalendarAttributes data ) : void
data CalendarAttributes MonthCalendarField's data.
Результат void

PdfTemplate() публичный Метод

Using an AcroForm or a simple pdf template file as the Cells template.
public PdfTemplate ( string pdfTemplatePath, Action onFillAcroForm ) : void
pdfTemplatePath string An AcroForm or a simple pdf template file's path. Only first page of the passed AcroForm makes sense here as a cell's template!
onFillAcroForm Action Gives you the Row's data and AcroForm to set form.SetField method. It can be null.
Результат void

ProgressBar() публичный Метод

Displaying current cell's data as text plus a ProgressBar.
public ProgressBar ( Func progressBarColorFormula, bool showPercentText ) : void
progressBarColorFormula Func Progress bar's background color based on the current row's values.
showPercentText bool Indicates whether the percentage text should be displayed or not.
Результат void

ProgressBar() публичный Метод

Displaying current cell's data as text plus a ProgressBar.
public ProgressBar ( System progressBarColor, bool showPercentText ) : void
progressBarColor System Progress bar's background color
showPercentText bool Indicates whether the percentage text should be displayed or not
Результат void

Symbol() публичный Метод

Displaying the current cell's data as a Zapf Dingbats symbol.
public Symbol ( Func onSelectSymbol ) : void
onSelectSymbol Func Choose a Zapf Dingbats symbol based on the passed value.
Результат void

TextBlock() публичный Метод

Displaying current cell's data as text.
public TextBlock ( ) : void
Результат void

WingdingsSymbol() публичный Метод

Displaying the current cell's data as a Wingdings symbol.
public WingdingsSymbol ( Func onSelectSymbol ) : void
onSelectSymbol Func Choose a Wingdings symbol based on the passed value.
Результат void

XHtml() публичный Метод

Using iTextSharp's HTML to PDF capabilities. This method uses the XmlWorker class of iTextSharp.
public XHtml ( IList cssFilesPath = null, string inlineCss = "", string imagesRootPath = "" ) : void
cssFilesPath IList Optional external CSS files.
inlineCss string Optional inline CSS content.
imagesRootPath string Optional images directory path.
Результат void