Interface IRow
Represents the row in a table.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface IRow
Properties
Cells
Gets an ICells instance that represents the cell collection. Read-only
Declaration
ICells Cells { get; }
Property Value
Type | Description |
---|---|
ICells | The cells. |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
//Get the row from row collection
IRow row = table.Rows[0];
//Get the cell collection from the row, read only
ICells cells = row.Cells;
//Set the text content for cells in row
cells[0].TextBody.AddParagraph("First row, First Column");
cells[1].TextBody.AddParagraph("First row, Second Column");
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
'Get the row from row collection
Dim row As IRow = table.Rows(0)
'Get the cell collection from the row, read only
Dim cells As ICells = row.Cells
'Set the text content for cells in row
cells(0).TextBody.AddParagraph("First row, First Column")
cells(1).TextBody.AddParagraph("First row, Second Column")
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Height
Gets or sets height of the row, in points.
Declaration
double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height. |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
//Get the row from row collection
IRow row = table.Rows[0];
//Set the height of the row
row.Height = 40;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create instance of PowerPoint presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Add slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
'Get the row from row collection
Dim row As IRow = table.Rows(0)
'Set the height of the row
row.Height = 40
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Methods
Clone()
Creates a copy of the current row.
Declaration
IRow Clone()
Returns
Type | Description |
---|---|
IRow | Returns the cloned row object |
Examples
//Create instance of PowerPoint presentation
IPresentation presentation = Presentation.Create();
//Add slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add table to the slide
ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
//Clone the row element.
IRow row = table.Rows[0].Clone();
//Add text content to the cell.
row.Cells[0].TextBody.Text = "Cloned row";
//Add row to the collection
table.Rows.Add(row);
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation.
Dim pptxDoc As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Add table to the slide
Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
'Clone the row element.
Dim row As IRow = table.Rows(0).Clone()
'Add text content to the cell.
row.Cells(0).TextBody.Text = "Cloned row"
'Add row to the collection
table.Rows.Add(row)
'Saves the Presentation.
pptxDoc.Save("Sample.pptx")
'Close the presentation.
pptxDoc.Close()