Spread Windows Forms 6.0 Product Documentation
Item(Int32,Int32,Int32,Int32) Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > Cells Class > Item Property : Item(Int32,Int32,Int32,Int32) Property


row
Row index of first cell in range
column
Column index of first cell in range
row2
Row index of last cell in range
column2
Column index of last cell in range

Glossary Item Box

Gets a new cell for the range of cells of the specified rows and columns.

Syntax

Visual Basic (Declaration) 
Public Overloads ReadOnly Property Item( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal row2 As Integer, _
   ByVal column2 As Integer _
) As Cell
Visual Basic (Usage)Copy Code
Dim instance As Cells
Dim row As Integer
Dim column As Integer
Dim row2 As Integer
Dim column2 As Integer
Dim value As Cell
 
value = instance.Item(row, column, row2, column2)
C# 
public Cell Item( 
   int row,
   int column,
   int row2,
   int column2
) {get;}

Parameters

row
Row index of first cell in range
column
Column index of first cell in range
row2
Row index of last cell in range
column2
Column index of last cell in range

Property Value

Cell object for the range of cells of the specified rows and columns

Exceptions

ExceptionDescription
System.IndexOutOfRangeException Specified starting row index is not valid; must be between zero and the total number of rows
System.IndexOutOfRangeException Specified starting column index is not valid; must be between zero and the total number of columns
System.IndexOutOfRangeException Specified starting column header row index is not valid; must be between zero and the total number of column header rows
System.IndexOutOfRangeException Specified starting row header column index is not valid; must be between zero and the total number of row header columns
System.IndexOutOfRangeException Specified starting sheet corner row index is not valid; must be between zero and the total number of sheet corner rows
System.IndexOutOfRangeException Specified starting sheet corner column index is not valid; must be between zero and the total number of sheet corner columns
System.IndexOutOfRangeException Specified ending row index is not valid; must be between zero and the total number of rows
System.IndexOutOfRangeException Specified ending column index is not valid; must be between zero and the total number of columns
System.IndexOutOfRangeException Specified ending column header row index is not valid; must be between zero and the total number of column header rows
System.IndexOutOfRangeException Specified ending row header column index is not valid; must be between zero and the total number of row header columns
System.IndexOutOfRangeException Specified ending sheet corner row index is not valid; must be between zero and the total number of sheet corner rows
System.IndexOutOfRangeException Specified ending sheet corner column index is not valid; must be between zero and the total number of sheet corner columns

Example

This example changes the background color of several cells.
C#Copy Code
The Item property is not available in C#. Use the cell indexes.
Visual BasicCopy Code
FpSpread1.ActiveSheet.Cells.Item(0, 0, 2, 2).BackColor = Color.Yellow

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.