Spread WPF Documentation
SetValue(Int32,Int32,Object) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > SetValue Method : SetValue(Int32,Int32,Object) Method
The row index.
The column index.
The value to set for the specified cell.
Sets the value for the specified cell in the specified sheet area.
Syntax
'Declaration
 
Public Overloads Sub SetValue( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal value As System.Object _
) 
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim value As System.Object
 
instance.SetValue(row, column, value)
public void SetValue( 
   System.int row,
   System.int column,
   System.object value
)

Parameters

row
The row index.
column
The column index.
value
The value to set for the specified cell.
Example
This example uses the SetValue method.
for (int rowIndex = 0; rowIndex < this.gcSpreadSheet1.ActiveSheet.RowCount; rowIndex++)
            {
                for (int colIndex = 0; colIndex < this.gcSpreadSheet1.ActiveSheet.ColumnCount; colIndex++)
                {
                    this.gcSpreadSheet1.Sheets[0].SetValue(rowIndex, colIndex, rowIndex * 10 + colIndex);
                }
            }
For rowIndex As Integer = 0 To Me.gcSpreadSheet1.ActiveSheet.RowCount - 1
            For colIndex As Integer = 0 To Me.GcSpreadSheet1.ActiveSheet.ColumnCount - 1
                Me.GcSpreadSheet1.Sheets(0).SetValue(rowIndex, colIndex, rowIndex * 10 + colIndex)
            Next
        Next
See Also

Reference

Worksheet Class
Worksheet Members
Overload List