We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

IParagraph increase Rows

Thread ID:

Created:

Updated:

Platform:

Replies:

150668 Jan 15,2020 01:35 PM UTC Jan 23,2020 09:31 AM UTC WinForms 5
loading
Tags: Presentation
Fernanda
Asked On January 15, 2020 01:35 PM UTC

I am trying to fill the cells starting at a certain position and need the rows to increment. Right now it just keeps adding all items to the same cell instead of jumping to the next row. I have and IParagraph in Presentation that I am trying to increment the row by 1.

Loketha Erusappan [Syncfusion]
Replied On January 17, 2020 02:37 PM UTC

Hi Fernanda,

Thank you for contacting Syncfusion support.

Adding of more items in the cell doesn’t allow you to create a new row automatically instead you have to create a new row and insert the items which you want to present in each row. To insert a new row and insert the items in specified row as per your wish, we suggest you to refer the below link. This link will contain the information about how to create rows in the table and adding of rows.

Creating a table with specified rows:
https://help.syncfusion.com/file-formats/presentation/working-with-tables#create-a-table-by-adding-rows

Inserting rows in the table:
https://help.syncfusion.com/file-formats/presentation/working-with-tables#insert-a-row-in-table

Please let us know if you have any questions.

Regards,
Loketha E
 


Fernanda
Replied On January 17, 2020 05:02 PM UTC

I used inserting a row in the table, but it seems to copy the first row twice. It adds it again in the last row. 

Loketha Erusappan [Syncfusion]
Replied On January 20, 2020 11:04 AM UTC

Hi Fernanda,

Thank you for your update.

Please find below details and use as per your requirement based.

Insert a row in specified index:
Please find the below sample to know more about how to add a row in specified index and modify the content as per your wish.

Sample
Append new row in the table:
Please find below UG documentation link to know more about how to append a new row in the table.

 


Fernanda
Replied On January 22, 2020 01:23 PM UTC

How can I delete the last extra row it is adding?

Loketha Erusappan [Syncfusion]
Replied On January 23, 2020 09:31 AM UTC

Hi Fernanda,

Thank you for your update.

Please find below detail for your query.

To remove the last row from the table, please find below code snippet. If your requirement is to remove the specific row, then it can be removed by mentioned the row index instead of
table.Rows.Count-1 in the below code snippet.

 
//Create a PowerPoint presentation 
IPresentation pptxDoc = Presentation.Create(); 
//Add slide to the presentation 
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank); 
//Add a table to the slide 
ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200); 
//Initialize index values to add text to table cells 
int rowIndex = 0, colIndex; 
//Iterate row-wise cells and add text to it 
foreach (IRow rows in table.Rows) 
{ 
colIndex = 0; 
foreach (ICell cell in rows.Cells) 
{ 
cell.TextBody.AddParagraph("(" + rowIndex.ToString() + " , " + colIndex.ToString() + ")"); 
colIndex++; 
} 
rowIndex++; 
} 
//Removes the last row from the table. 
table.Rows.Remove(table.Rows[table.Rows.Count-1]); 
//Save the presentation 
pptxDoc.Save("Sample.pptx"); 
//Close the presentation 
pptxDoc.Close(); 
 

Please let us know if you have any questions.

Regards,
Loketha E
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon