PDF Table: Setting cell.PreferredWidth

0 Answers 270 Views
PdfProcessing
Charles
Top achievements
Rank 1
Charles asked on 02 Jun 2022, 10:08 AM

Hi,

 

I want to set a particular cell to be 20% wide.  I am using .NET MVC libraries.

My code reads as follows 

using CellWidth = Telerik.Windows.Documents.Flow.Model.Styles;

.
.
.

                detailsLine = table.Rows.AddTableRow();
                detailsCell = detailsLine.Cells.AddTableCell();
                detailsCell.PreferredWidth = new CellWidth.TableWidthUnit(CellWidth.TableWidthUnitType.Percent, 20.0);

I have an error:

CS0029: Cannot implicitly convert type 'Telerik.Windows.Documnets.Flow.Model.Styles.TableWidthUnit' to 'double?'

 

What can I do.

Dimitar
Telerik team
commented on 03 Jun 2022, 05:38 AM

Hi Charles,

I have tested this but I was unable to reproduce it.  I've attached my test project. Could you please check it and let me know what I need to change in order to reproduce this.

In addition, can you share which version of the suite you are using?

Thank you in advance for your patience and cooperation. I am looking forward to your reply.

No answers yet. Maybe you can help?

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