menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface ICells - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface ICells

    Represents a collection of ICell objects in a table.

    Inherited Members
    System.Collections.Generic.IEnumerable<Syncfusion.Presentation.ICell>.GetEnumerator()
    Namespace: Syncfusion.Presentation
    Assembly: Syncfusion.Presentation.Base.dll
    Syntax
    public interface ICells : IEnumerable<ICell>, IEnumerable

    Properties

    Count

    Gets the number of cells in the row or column. Read-only.

    Declaration
    int Count { get; }
    Property Value
    Type
    System.Int32
    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(3, 3, 100, 120, 300, 200);
    //Create instance to hold the cell collection from the table
    ICells cells = table.Rows[0].Cells;
    //Get the count of cells, read only
    int count = cells.Count;
    //Save the presentation
    presentation.Save("Cells.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(3, 3, 100, 120, 300, 200)
    'Create instance to hold the cell collection from the table
    Dim cells As ICells = table.Rows(0).Cells
    'Get the count of cells, read only
    Dim count As Integer = cells.Count
    'Save the presentation
    presentation__1.Save("Cells.pptx")
    'Close the presentation
    presentation__1.Close()

    Item[Int32]

    Gets a ICell instance at the specified index from the row or column. Read-only.

    Declaration
    ICell this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element.

    Property Value
    Type Description
    ICell

    Returns the cell at the particular index if found otherwise -1.

    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(3, 3, 100, 120, 300, 200);
    //Create instance to hold the cell collection from the table
    ICells cells = table.Rows[0].Cells;
    //Get the specific cell from the collection, read only
    ICell cell = cells[0];
    //Add text content to cell
    cell.TextBody.AddParagraph("First row, first cell");
    //Save the presentation
    presentation.Save("Cells.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(3, 3, 100, 120, 300, 200)
    'Create instance to hold the cell collection from the table
    Dim cells As ICells = table.Rows(0).Cells
    'Get the specific cell from the collection, read only
    Dim cell As ICell = cells(0)
    'Add text content to cell
     cell.TextBody.AddParagraph("First row, first cell")
    'Save the presentation
    presentation__1.Save("Cells.pptx")
    'Close the presentation
    presentation__1.Close()

    Extension Methods

    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>, Int32)
    FunctionalExtensions.Zip<TFirst, TSecond, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
    FunctionalExtensions.Fold<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldLeft<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldRight<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.ToObservableCollection<T>(IEnumerable<T>)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, String[], IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, List<String>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, Int32, Func<TElement, Object>[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    ChartExtensionUtils.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved