Class PdfGridBuiltinStyleSettings
Represents the grid built-in style settings.
Inheritance
System.Object
PdfGridBuiltinStyleSettings
Namespace: Syncfusion.Pdf.Grid
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfGridBuiltinStyleSettings : Object
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a new PDF grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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
PdfGridBuiltinStyleSettings()
Declaration
public PdfGridBuiltinStyleSettings()
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 grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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 grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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 grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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 grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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 grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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 grid instance.
PdfGrid table = new PdfGrid();
//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 grid build style settings instance.
PdfGridBuiltinStyleSettings settings = new PdfGridBuiltinStyleSettings();
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(PdfGridBuiltinStyle.GridTable3, settings);
//Draw grid 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 grid instance.
Dim table As New PdfGrid()
'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 grid build style settings instance.
Dim settings As New PdfGridBuiltinStyleSettings()
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(PdfGridBuiltinStyle.GridTable3, settings)
'Draw grid 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)