For the PDF Processing , I have to attache a single table row and there will be two cells.(some thing which is simillar to the attachment).
1.First cell constitutes of Question.
2.Second Sells constitues of a table.
It his scenario possible?
6 Answers, 1 is accepted
To create a TableCell instance in PdfProcessing which occupies a specified number of rows you can set the RowSpan property. For example:
You can set default styling to all cells in a table using the Table's DefaultCellProperties property. In order to set alternating background color for Table rows, you should manually apply the Background color for the cells in each alternating row:
When a table is generated, it could be inserted in the PDF document using the RadFixedDocumentEditor's InsertTable() method as can be seen in the Drawing Table with RadFixedDocumentEditor section of the documentation.
I hope this helps.
Thank you for the inputs , we were able to solve much complicated scenarios invoiving tables , Cells and Blocks but this is where we are struck right now.I am looking for a more specific solution simillar to what is ther in the attachement.
I can give both column spans and Row Spans but what i am looking at is first coloumn needs to have certain content and rest of the coloumns would be having rows.Is this possible ?
To accomplish the desired result, you can set the TableCell.RowSpan property of the first cell to the number of the table rows. This way you can set your own content which will occupy through the rows of the entire table:
After this, you can add the preceding text cell by adding cell on the first row and setting the TableCell.ColumnSpan property to the number of remaining columns:
Please, note that setting the table rows height is currently not implemented in PdfProcessing. We have logged feature request in our feedback portal: PdfProcessing: Implement option for setting height to table rows, where you can subscribe to be notified for any status updates and vote to increase the priority. Alternatively, you can apply a certain row height by setting the TableCell.Padding property:
Please, find the attached solution, which creates a sample table similar to the attachment you have provided.
I hope this helps.
I already answer your question in the support ticket you have opened and will place the answer here as well.
You can create a table containing a single cell with a bottom border set in the following manner:
Table table = new Table(); TableRow firstRow = table.Rows.AddTableRow(); TableCell firstCell = firstRow.Cells.AddTableCell(); firstCell.PreferredWidth = 50; Block firstCellBlock = firstCell.Blocks.AddBlock(); firstCellBlock.GraphicProperties.FillColor = RgbColors.White; firstCellBlock.InsertText("."); Border border = new Border(1, RgbColors.Black); firstCell.Borders = new TableCellBorders(null, null, null, bottom: border);
I have to mention, currently, there is a limitation in the Table object (the setting of a table row height is not supported) so if you create a table row with an empty table cell the bottom border would be drawn in place of the top border because the table height won't be set (the table cell starting point is the top left corner). The border would be correctly drawn if the table cell has content (in the provided code snippet we are setting the color of this content to white in order to not be visible). We have an item logged in our backlog to implement an option for setting the height to table rows: PdfProcessing: Implement an option for setting the height to table rows. You can cast your vote for the implementation as well as subscribe to the task by clicking the Follow button so you can receive updates when its status changes.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.