Gets an IEnumerable that can be used to iterate over the cells in this CellRange.

Namespace:  C1.Silverlight.FlexGrid
Assembly:  C1.Silverlight.FlexGrid.4 (in C1.Silverlight.FlexGrid.4.dll)

Syntax

C#
public IEnumerable<CellRange> Cells { get; }
Visual Basic
Public ReadOnly Property Cells As IEnumerable(Of CellRange)
	Get

Examples

The code below shows how you can use the Cells property to add all integer values in a given cell range.
Copy CodeC#
var total = 0;
foreach (var cell in rng.Cells)
{
  var value = grid[cell.Row, cell.Column];
  if (value is int)
  {
    total += (int)value;
  }
}

See Also