GrapeCity.Xaml.SpreadSheet.Data
SetValue Method (Column)
Example 


The row index.
The value for the cell.
Sets the value in a specified row in the current column.
Syntax
'Declaration
 
Public Sub SetValue( _
   ByVal row As Integer, _
   ByVal value As Object _
) 
'Usage
 
Dim instance As Column
Dim row As Integer
Dim value As Object
 
instance.SetValue(row, value)
public void SetValue( 
   int row,
   object value
)

Parameters

row
The row index.
value
The value for the cell.
Example
This example uses the SetValue method.
for (int i = 0; i < gcSpreadSheet1.Sheets[0].RowCount; i++)
{
    gcSpreadSheet1.Sheets[0].Columns[1].SetValue(i, i);
}
gcSpreadSheet1.Sheets[0].Columns[1].Background = new SolidColorBrush(Windows.UI.Colors.Gray);
gcSpreadSheet1.Sheets[0].Columns[1].Foreground = new SolidColorBrush(Windows.UI.Colors.Red);
gcSpreadSheet1.Sheets[0].Columns[1].Formatter = new GrapeCity.Xaml.SpreadSheet.Data.GeneralFormatter("0.00");
gcSpreadSheet1.Sheets[0].Columns[1].FontSize = 12;
gcSpreadSheet1.Sheets[0].Columns[1].FontWeight = Windows.UI.Text.FontWeights.Bold;
gcSpreadSheet1.Sheets[0].Columns[1].BorderBottom = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin);
gcSpreadSheet1.Sheets[0].Columns[1].BorderTop = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin);
gcSpreadSheet1.Sheets[0].Columns[1].BorderLeft = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin);
gcSpreadSheet1.Sheets[0].Columns[1].BorderRight = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin);
For i As Integer = 0 To GcSpreadSheet1.Sheets(0).RowCount - 1
    GcSpreadSheet1.Sheets(0).Columns(1).SetValue(i, i)
Next
GcSpreadSheet1.Sheets(0).Columns(1).Background = New SolidColorBrush(Windows.UI.Colors.Gray)
GcSpreadSheet1.Sheets(0).Columns(1).Foreground = New SolidColorBrush(Windows.UI.Colors.Red)
GcSpreadSheet1.Sheets(0).Columns(1).Formatter = New GrapeCity.Xaml.SpreadSheet.Data.GeneralFormatter("0.00")
GcSpreadSheet1.Sheets(0).Columns(1).FontSize = 12
GcSpreadSheet1.Sheets(0).Columns(1).FontWeight = Windows.UI.Text.FontWeights.Bold
GcSpreadSheet1.Sheets(0).Columns(1).BorderBottom = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin)
GcSpreadSheet1.Sheets(0).Columns(1).BorderTop = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin)
GcSpreadSheet1.Sheets(0).Columns(1).BorderLeft = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin)
GcSpreadSheet1.Sheets(0).Columns(1).BorderRight = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Green, GrapeCity.Xaml.SpreadSheet.Data.BorderLineStyle.Thin)
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

Column Class
Column Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options