PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

How do I delete a row from a MigraDoc table?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3795
Page 1 of 1

Author:  dhaverstick [ Thu May 24, 2018 8:13 pm ]
Post subject:  How do I delete a row from a MigraDoc table?

I have a situation where I need to know when a table has one too many rows to fit on a 8.5"x11" page rendered from a MigraDoc Document. What I do is add rows to the table using .AddRow, make a clone of the document, render it, and get a page count. When the page count = 2 then I know that I have added one too many rows. What I can't figure out, though, is how to get rid of that extra row so that my table will fit on one page. Is it possible to do this?

Thanks,

Darren

Author:  TH-Soft [ Thu May 24, 2018 8:37 pm ]
Post subject:  Re: How do I delete a row from a MigraDoc table?

dhaverstick wrote:
Is it possible to do this?
It's bally simple.
Just call the "RemoveObjectAt" method of the "Rows" property of your "Table".

Author:  dhaverstick [ Fri May 25, 2018 11:54 am ]
Post subject:  Re: How do I delete a row from a MigraDoc table?

TH-Soft, that did the trick. Thanks!!!

Darren

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/