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


row
Starting row index of range of cells
column
Starting column index of range of cells
row2
Ending row index of range of cells
column2
Ending column index of range of cells

Glossary Item Box

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

Syntax

Visual Basic (Declaration) 
Public Overloads Function Get( _
   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.Get(row, column, row2, column2)
C# 
public Cell Get( 
   int row,
   int column,
   int row2,
   int column2
)

Parameters

row
Starting row index of range of cells
column
Starting column index of range of cells
row2
Ending row index of range of cells
column2
Ending column index of range of cells

Return Value

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

Exceptions

ExceptionDescription
System.IndexOutOfRangeException Specified row or column index is less than 0 or greater than or equal to the row count or column count.
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 row index is not valid; must be between zero and the total number of column header rows
System.IndexOutOfRangeException Specified starting column index is not valid; must be between zero and the total number of row header 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 row index is not valid; must be between zero and the total number of column header rows
System.IndexOutOfRangeException Specified ending column index is not valid; must be between zero and the total number of row header columns

Example

C#Copy Code
private void button1Click(object sender, System.EventArgs e)
{
         FarPoint.Win.Spread.Cell cell;
         cell = fpSpread1.ActiveSheet.Cells.Get(0, 0, 3, 3);
         cell.BackColor = Color.Yellow;
}
Visual BasicCopy Code
Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
         Dim cell As FarPoint.Win.Spread.Cell
         cell = FpSpread1.ActiveSheet.Cells.Get(0, 0, 3, 3)
         cell.BackColor = Color.Yellow
End Sub

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.