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. Image for the cookie policy date

Working with Tables

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


3 Replies

SK Surya Kumar Syncfusion Team May 26, 2017 10:40 AM UTC

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
 
 



LA Lee Alderdice May 26, 2017 02:43 PM UTC

Hi Surya,

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

Thanks,

Lee


SK Surya Kumar Syncfusion Team May 29, 2017 08:42 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon