C# Класс PdfRpt.Core.Helper.TableHelper

PdfGrid helper class
Показать файл Открыть проект

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

Метод Описание
AddBorderToTable ( this table ) : PdfGrid

Adds a border to an existing PdfGrid

AddBorderToTable ( this table, BaseColor borderColor, float spacingBefore ) : PdfGrid

Adds a border to an existing PdfGrid

AddDefaultEmptyDataSourceTable ( Document pdfDoc, IPdfFont pdfRptFont, PdfRunDirection runDirection, string message = "There is no data available to display." ) : void

It will be used for OnDataSourceIsEmptyEvent.

AddSimpleRow ( this table ) : void

Adds a new row to the specified table. The default IColumnItemsTemplate would be TextBlockField.

AddSummaryRow ( this table, IList pdfColumnsDefinitions, string summaryProperty, string labelProperty, PdfRpt.Core.Contracts.CellAttributes summaryCell, PdfRpt.Core.Contracts.CellAttributes labelCell, PdfRpt.Core.Contracts.CellAttributes emptyCell, IColumnItemsTemplate itemsTemplate ) : void

Adds a SummaryRow to an existing PdfGrid

CloneMainTableStructure ( DocumentPreferences pageSetup, IList pdfColumnsDefinitions ) : PdfGrid

To add manual AddSummaryRows, we need to create a clone of the MainTable's structure.

CreateEmptyRowTable ( string phrase = " ", float widthPercentage = 100, float fixedHeight = 35, int border ) : PdfGrid

Creates a new PdfGrid with one column and row.

SimpleTable ( int columnsNumber, IList pdfCellAttributesList ) : PdfGrid

Creates a simple PdfGrid.

SimpleTable ( int columnsNumber, IList pdfCellAttributesList, BaseColor nullRowBackgroundColor, bool showBorder = true ) : PdfGrid

Creates a simple PdfGrid.

SimpleTable ( int columnsNumber, IList pdfCellAttributesList, bool showBorder ) : PdfGrid

Creates a simple PdfGrid.

Приватные методы

Метод Описание
addSimpleRowCell ( PdfGrid table, CellBasicProperties>.Action cellDataItem ) : void

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

AddBorderToTable() публичный статический Метод

Adds a border to an existing PdfGrid
public static AddBorderToTable ( this table ) : PdfGrid
table this table
Результат PdfRpt.Core.Contracts.PdfGrid

AddBorderToTable() публичный статический Метод

Adds a border to an existing PdfGrid
public static AddBorderToTable ( this table, BaseColor borderColor, float spacingBefore ) : PdfGrid
table this Table
borderColor iTextSharp.text.BaseColor Border's color
spacingBefore float Spacing before the table
Результат PdfRpt.Core.Contracts.PdfGrid

AddDefaultEmptyDataSourceTable() публичный статический Метод

It will be used for OnDataSourceIsEmptyEvent.
public static AddDefaultEmptyDataSourceTable ( Document pdfDoc, IPdfFont pdfRptFont, PdfRunDirection runDirection, string message = "There is no data available to display." ) : void
pdfDoc iTextSharp.text.Document Pdf document object
pdfRptFont IPdfFont fonts
runDirection PdfRunDirection A possible run direction value, left-to-right or right-to-left
message string a message to show
Результат void

AddSimpleRow() публичный статический Метод

Adds a new row to the specified table. The default IColumnItemsTemplate would be TextBlockField.
public static AddSimpleRow ( this table ) : void
table this
Результат void

AddSummaryRow() публичный статический Метод

Adds a SummaryRow to an existing PdfGrid
public static AddSummaryRow ( this table, IList pdfColumnsDefinitions, string summaryProperty, string labelProperty, PdfRpt.Core.Contracts.CellAttributes summaryCell, PdfRpt.Core.Contracts.CellAttributes labelCell, PdfRpt.Core.Contracts.CellAttributes emptyCell, IColumnItemsTemplate itemsTemplate ) : void
table this An existing PdfGrid
pdfColumnsDefinitions IList List of the PdfColumnAttributes
summaryProperty string Sets the location of summary cell's data
labelProperty string Sets the location of summary cell's label
summaryCell PdfRpt.Core.Contracts.CellAttributes SummaryCell's Attributes
labelCell PdfRpt.Core.Contracts.CellAttributes LabelCell's Attributes
emptyCell PdfRpt.Core.Contracts.CellAttributes The other not in use cell's Attributes
itemsTemplate IColumnItemsTemplate Default ItemsTemplate
Результат void

CloneMainTableStructure() публичный статический Метод

To add manual AddSummaryRows, we need to create a clone of the MainTable's structure.
public static CloneMainTableStructure ( DocumentPreferences pageSetup, IList pdfColumnsDefinitions ) : PdfGrid
pageSetup PdfRpt.Core.Contracts.DocumentPreferences Document settings
pdfColumnsDefinitions IList List of the PdfColumnAttributes
Результат PdfRpt.Core.Contracts.PdfGrid

CreateEmptyRowTable() публичный статический Метод

Creates a new PdfGrid with one column and row.
public static CreateEmptyRowTable ( string phrase = " ", float widthPercentage = 100, float fixedHeight = 35, int border ) : PdfGrid
phrase string An optional phrase to display
widthPercentage float Width of the table
fixedHeight float Height of the table
border int Border width
Результат PdfRpt.Core.Contracts.PdfGrid

SimpleTable() публичный статический Метод

Creates a simple PdfGrid.
public static SimpleTable ( int columnsNumber, IList pdfCellAttributesList ) : PdfGrid
columnsNumber int number of columns
pdfCellAttributesList IList PdfCells Attributes List
Результат PdfRpt.Core.Contracts.PdfGrid

SimpleTable() публичный статический Метод

Creates a simple PdfGrid.
public static SimpleTable ( int columnsNumber, IList pdfCellAttributesList, BaseColor nullRowBackgroundColor, bool showBorder = true ) : PdfGrid
columnsNumber int Number of columns
pdfCellAttributesList IList PdfCells Attributes List
nullRowBackgroundColor iTextSharp.text.BaseColor You can set the cells attributes to null. nullRowBackgroundColor indicates background color of these cells. Default color is white here.
showBorder bool Indicates visibility of the table's border
Результат PdfRpt.Core.Contracts.PdfGrid

SimpleTable() публичный статический Метод

Creates a simple PdfGrid.
public static SimpleTable ( int columnsNumber, IList pdfCellAttributesList, bool showBorder ) : PdfGrid
columnsNumber int number of columns
pdfCellAttributesList IList PdfCells Attributes List
showBorder bool Indicates visibility of the table's border
Результат PdfRpt.Core.Contracts.PdfGrid