Class PdfLightTableBuiltinStyleSettings
Represents the light table built-in style settings.
Inheritance
System.Object
PdfLightTableBuiltinStyleSettings
Namespace: Syncfusion.Pdf.Tables
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfLightTableBuiltinStyleSettings : Object
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
Constructors
PdfLightTableBuiltinStyleSettings()
Declaration
public PdfLightTableBuiltinStyleSettings()
Properties
ApplyStyleForBandedColumns
Gets or sets a value indicating whether to apply style bands to the columns in a table,
Declaration
public bool ApplyStyleForBandedColumns { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
ApplyStyleForBandedRows
Gets or sets a value indicating whether to apply style bands to the rows in a table
Declaration
public bool ApplyStyleForBandedRows { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
ApplyStyleForFirstColumn
Gets or sets a value indicating whether to apply first-column formatting to the first column of the specified table
Declaration
public bool ApplyStyleForFirstColumn { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
ApplyStyleForHeaderRow
Gets or sets a value indicating whether to apply heading-row formatting to the first row of the table.
Declaration
public bool ApplyStyleForHeaderRow { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
ApplyStyleForLastColumn
Gets or sets a value indicating whether to apply first-column formatting to the first column of the specified table.
Declaration
public bool ApplyStyleForLastColumn { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
ApplyStyleForLastRow
Gets or sets a value indicating whether to apply last-row formatting to the last row of the specified table.
Declaration
public bool ApplyStyleForLastRow { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF light table instance.
PdfLightTable table = new PdfLightTable();
//Create a DataTable.
DataTable dataTable = new DataTable();
//Add columns to the DataTable
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
//Add rows to the DataTable.
dataTable.Rows.Add(new object[] { "E01", "Clay" });
dataTable.Rows.Add(new object[] { "E02", "Thomas" });
dataTable.Rows.Add(new object[] { "E03", "George" });
dataTable.Rows.Add(new object[] { "E04", "Stefan" });
dataTable.Rows.Add(new object[] { "E05", "Mathew" });
//Assign data source.
table.DataSource = dataTable;
//Create PDF light table build style settings instance.
dfLightTableBuiltinStyleSettings settings = new PdfLightTableBuiltinStyleSettings();
settings.ApplyStyleForBandedColumns = true;
settings.ApplyStyleForBandedRows = true;
settings.ApplyStyleForFirstColumn = true;
settings.ApplyStyleForHeaderRow = true;
settings.ApplyStyleForLastColumn = true;
settings.ApplyStyleForLastRow = true;
//Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings);
//Draw table to the page of PDF document.
table.Draw(page, new PointF(10, 10));
//Save the document.
doc.Save("Output.pdf");
//close the document
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF light table instance.
Dim table As New PdfLightTable()
'Create a DataTable.
Dim dataTable As New DataTable()
'Add columns to the DataTable
dataTable.Columns.Add("ID")
dataTable.Columns.Add("Name")
'Add rows to the DataTable.
dataTable.Rows.Add(New Object() { "E01", "Clay"})
dataTable.Rows.Add(New Object() { "E02", "Thomas"})
dataTable.Rows.Add(New Object() { "E03", "George"})
dataTable.Rows.Add(New Object() { "E04", "Stefan"})
dataTable.Rows.Add(New Object() { "E05", "Mathew"})
'Assign data source.
table.DataSource = dataTable
'Create PDF light table build style settings instance.
Dim settings As New PdfLightTableBuiltinStyleSettings()
settings.ApplyStyleForBandedColumns = True
settings.ApplyStyleForBandedRows = True
settings.ApplyStyleForFirstColumn = True
settings.ApplyStyleForHeaderRow = True
settings.ApplyStyleForLastColumn = True
settings.ApplyStyleForLastRow = True
'Apply built-in table style
table.ApplyBuiltinStyle(PdfLightTableBuiltinStyle.ListTable6ColorfulAccent4, settings)
'Draw table to the page of PDF document.
table.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)