PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Dec 01, 2020 12:09 am

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Apr 10, 2020 6:04 pm 

Joined: Sun Apr 05, 2020 6:50 pm
Posts: 3
I'm new to using MigraDoc.

I can create the table ok, but I can't populate it using a foreach loop.

Any help much appreciated.

Column column = table.AddColumn();

        column = table.AddColumn();

        Row row = table.AddRow();
        foreach (var item in model.UploadedFiles)
            Cell cell = row.Cells[item.Filename];

Reply with quote  
PostPosted: Tue Apr 14, 2020 10:21 am 
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 593
Location: CCAA
To get the cell of the first column, use code like
Cell cell = row.Cells[0];

Best regards
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 16 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group