Hi Lee,
Thank you for using Syncfusion Products.
In Asp.Net Core application you can directly add rows and columns to PdfGrid table, with the help of code snippet below:
//Create a new PdfGrid.
PdfGrid pdfGrid = new PdfGrid();
//Add three columns.
pdfGrid.Columns.Add(3);
//Add header.
pdfGrid.Headers.Add(1);
PdfGridRow pdfGridHeader = pdfGrid.Headers[0];
pdfGridHeader.Cells[0].Value = "Employee ID";
pdfGridHeader.Cells[1].Value = "Employee Name";
pdfGridHeader.Cells[2].Value = "Salary";
//Add rows.
PdfGridRow pdfGridRow = pdfGrid.Rows.Add();
pdfGridRow.Cells[0].Value = "E01";
pdfGridRow.Cells[1].Value = "Clay";
pdfGridRow.Cells[2].Value = "$10,000";
//Draw the PdfGrid.
pdfGrid.Draw(page, PointF.Empty); |
We have created the sample for the same and it can be downloaded from the below location, please find the link:
Let us know if you need any further information regarding this.
Regards,
Surya Kumar