We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Working with Tables

Thread ID:

Created:

Updated:

Platform:

Replies:

130683 May 25,2017 11:07 AM May 29,2017 04:42 AM ASP.NET Core 3
loading
Tags: PDF
Lee Alderdice
Asked On May 25, 2017 11:07 AM

Hi,

In the examples for initating a table there is DataTable dataTable = new DataTable();

DataTable is not supported by .Net Core (https://github.com/dotnet/corefx/pull/12426), is there an alternative method or assembly I should reference?

Thanks,

Lee


Surya Kumar [Syncfusion]
Replied On May 26, 2017 06:40 AM

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
 
 


Lee Alderdice
Replied On May 26, 2017 10:43 AM

Hi Surya,

Many thanks for the response I will try that out and confirm back.

Thanks,

Lee

Surya Kumar [Syncfusion]
Replied On May 29, 2017 04:42 AM

Hi Lee, 
 
Thanks for the update, we will wait to hear from you. 
 
Regards, 
Surya Kumar. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;