Class PdfGridRowCollection
Provides access to an ordered, strongly typed collection of PdfGridRow objects.
Implements
System.Collections.Generic.IList<PdfGridRow>
System.Collections.Generic.ICollection<PdfGridRow>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<PdfGridRow>
System.Collections.Generic.IReadOnlyCollection<PdfGridRow>
System.Collections.Generic.IEnumerable<PdfGridRow>
System.Collections.IEnumerable
Inherited Members
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.AddRange(System.Collections.Generic.IEnumerable<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.AsReadOnly()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.BinarySearch(Syncfusion.Pdf.Grid.PdfGridRow)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.BinarySearch(Syncfusion.Pdf.Grid.PdfGridRow, System.Collections.Generic.IComparer<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.BinarySearch(System.Int32, System.Int32, Syncfusion.Pdf.Grid.PdfGridRow, System.Collections.Generic.IComparer<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Capacity
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Clear()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Contains(Syncfusion.Pdf.Grid.PdfGridRow)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.ConvertAll<TOutput>(System.Converter<Syncfusion.Pdf.Grid.PdfGridRow, TOutput>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.CopyTo(Syncfusion.Pdf.Grid.PdfGridRow[])
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.CopyTo(Syncfusion.Pdf.Grid.PdfGridRow[], System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.CopyTo(System.Int32, Syncfusion.Pdf.Grid.PdfGridRow[], System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Count
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Exists(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Find(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindAll(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindIndex(System.Int32, System.Int32, System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindIndex(System.Int32, System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindIndex(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindLast(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindLastIndex(System.Int32, System.Int32, System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindLastIndex(System.Int32, System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.FindLastIndex(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.ForEach(System.Action<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.GetEnumerator()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.IndexOf(Syncfusion.Pdf.Grid.PdfGridRow)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.IndexOf(Syncfusion.Pdf.Grid.PdfGridRow, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.IndexOf(Syncfusion.Pdf.Grid.PdfGridRow, System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Insert(System.Int32, Syncfusion.Pdf.Grid.PdfGridRow)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Item[System.Int32]
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.LastIndexOf(Syncfusion.Pdf.Grid.PdfGridRow)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.LastIndexOf(Syncfusion.Pdf.Grid.PdfGridRow, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.LastIndexOf(Syncfusion.Pdf.Grid.PdfGridRow, System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Remove(Syncfusion.Pdf.Grid.PdfGridRow)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.RemoveAll(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.RemoveAt(System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Reverse()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Sort()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Sort(System.Collections.Generic.IComparer<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Sort(System.Comparison<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.Generic.ICollection<Syncfusion.Pdf.Grid.PdfGridRow>.IsReadOnly
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.Generic.IEnumerable<Syncfusion.Pdf.Grid.PdfGridRow>.GetEnumerator()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.Item[System.Int32]
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.ToArray()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.TrimExcess()
System.Collections.Generic.List<Syncfusion.Pdf.Grid.PdfGridRow>.TrueForAll(System.Predicate<Syncfusion.Pdf.Grid.PdfGridRow>)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf.Grid
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfGridRowCollection : List<PdfGridRow>, IList<PdfGridRow>, ICollection<PdfGridRow>, IList, ICollection, IReadOnlyList<PdfGridRow>, IReadOnlyCollection<PdfGridRow>, IEnumerable<PdfGridRow>, IEnumerable
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a PdfGrid.
PdfGrid pdfGrid = 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" });
//Assign data source.
pdfGrid.DataSource = dataTable;
//Add new row
PdfGridRow row = pdfGrid.Rows.Add();
row.Cells[0].Value = "E03";
row.Cells[1].Value = "Bran";
//Draw grid to the page of PDF document.
pdfGrid.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 PdfGrid.
Dim pdfGrid 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"})
'Assign data source.
pdfGrid.DataSource = dataTable
'Add new row
Dim row As PdfGridRow = pdfGrid.Rows.Add()
row.Cells(0).Value = "E03"
row.Cells(1).Value = "Bran"
'Draw grid to the page of PDF document.
pdfGrid.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
Methods
Add()
Add new row to the grid.
Declaration
public PdfGridRow Add()
Returns
Type | Description |
---|---|
PdfGridRow | The added row |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a PdfGrid.
PdfGrid pdfGrid = 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" });
//Assign data source.
pdfGrid.DataSource = dataTable;
//Add new row
PdfGridRow row = pdfGrid.Rows.Add();
row.Cells[0].Value = "E03";
row.Cells[1].Value = "Bran";
//Draw grid to the page of PDF document.
pdfGrid.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 PdfGrid.
Dim pdfGrid 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"})
'Assign data source.
pdfGrid.DataSource = dataTable
'Add new row
Dim row As PdfGridRow = pdfGrid.Rows.Add()
row.Cells(0).Value = "E03"
row.Cells(1).Value = "Bran"
'Draw grid to the page of PDF document.
pdfGrid.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
Add(PdfGridRow)
Add the row to the grid.
Declaration
public void Add(PdfGridRow row)
Parameters
Type | Name | Description |
---|---|---|
PdfGridRow | row |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a PdfGrid.
PdfGrid pdfGrid = 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" });
//Assign data source.
pdfGrid.DataSource = dataTable;
//Adding new Row
PdfGridRow row = new PdfGridRow(pdfGrid);
pdfGrid.Rows.Add(row);
row.Cells[0].Value = "E03";
row.Cells[1].Value = "Bran";
//Draw grid to the page of PDF document.
pdfGrid.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 PdfGrid.
Dim pdfGrid 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"})
'Assign data source.
pdfGrid.DataSource = dataTable
'Adding new Row
Dim row As New PdfGridRow(pdfGrid)
pdfGrid.Rows.Add(row)
row.Cells(0).Value = "E03"
row.Cells(1).Value = "Bran"
'Draw grid to the page of PDF document.
pdfGrid.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
ApplyStyle(PdfGridStyleBase)
Applies the style to all the rows in the grid.
Declaration
public void ApplyStyle(PdfGridStyleBase style)
Parameters
Type | Name | Description |
---|---|---|
PdfGridStyleBase | style |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a PdfGrid.
PdfGrid pdfGrid = 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" });
//Assign data source.
pdfGrid.DataSource = dataTable;
//Create Cell Style
PdfGridCellStyle style = new PdfGridCellStyle();
style.TextBrush = PdfBrushes.Cyan;
//Apply style to the specific row
pdfGrid.Rows.ApplyStyle(style);
//Draw grid to the page of PDF document.
pdfGrid.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 PdfGrid.
Dim pdfGrid 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"})
'Assign data source.
pdfGrid.DataSource = dataTable
'Create Cell Style
Dim style As New PdfGridCellStyle()
style.TextBrush = PdfBrushes.Cyan
'Apply style to the specific row
pdfGrid.Rows.ApplyStyle(style)
'Draw grid to the page of PDF document.
pdfGrid.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
SetSpan(Int32, Int32, Int32, Int32)
Sets the row span and column span to a cell.
Declaration
public void SetSpan(int rowIndex, int cellIndex, int rowSpan, int colSpan)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | Index of the row. |
System.Int32 | cellIndex | Index of the cell. |
System.Int32 | rowSpan | The row span. |
System.Int32 | colSpan | The col span. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page.
PdfPage page = doc.Pages.Add();
//Create a PdfGrid.
PdfGrid pdfGrid = 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" });
//Assign data source.
pdfGrid.DataSource = dataTable;
//Set Span to the cell
pdfGrid.Rows.SetSpan(0, 0, 2, 2);
//Draw grid to the page of PDF document.
pdfGrid.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 PdfGrid.
Dim pdfGrid 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"})
'Assign data source.
pdfGrid.DataSource = dataTable
'Set Span to the cell
pdfGrid.Rows.SetSpan(0, 0, 2, 2)
'Draw grid to the page of PDF document.
pdfGrid.Draw(page, New PointF(10, 10))
'Save the document.
doc.Save("Output.pdf")
'close the document
doc.Close(True)
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable