This is a migrated thread and some comments may be shown as answers.

VB.net version of Create Table Example

1 Answer 145 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Jamie asked on 03 May 2017, 11:47 AM

I'm trying to create a table and add strings to the cells in a RadFixedDocument as per the c# example here:

http://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/editing/table.html

table table = new Table();
TableRow row = table.Rows.AddTableRow();
row.Cells.AddTableCell().Blocks.AddBlock().InsertText("First cell");
row.Cells.AddTableCell().Blocks.AddBlock().InsertText("Second cell");

When I convert this to vb.net using your tool I get this:

Dim table As Telerik.Windows.Documents.Flow.Model.Table
Dim row As Telerik.Windows.Documents.Flow.Model.TableRow = table.Rows.AddTableRow()
row.Cells.AddTableCell().Blocks.AddBlock().InsertText("First cell")
row.Cells.AddTableCell().Blocks.AddBlock().InsertText("Second cell")

and get the following error:

AddBlock is not a member of BlockCollection

 

Could someone please attached a code snippet or demo showing how to create a PDF containing Tables with values in them but in VB.NET please.

(I am doing this in a AJAX web application Telerik R1 2017)

 

 

 

1 Answer, 1 is accepted

Sort by
0
Jamie
Top achievements
Rank 1
answered on 03 May 2017, 01:53 PM

An embarrassing mistake.. was using the wrong namespace, should have been using Telerik.Windows.Documents.Fixed.Model.Editing.Tables

Feel free to delete post ;)

 

Tags
PdfProcessing
Asked by
Jamie
Top achievements
Rank 1
Answers by
Jamie
Top achievements
Rank 1
Share this question
or