GrapeCity.Xaml.SpreadSheet.Data
SetText Method (Row)
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Row Class : SetText Method
The column index.
The text for the cell.
Sets the text in a specified column in the current row.
Syntax
'Declaration
 
Public Sub SetText( _
   ByVal column As Integer, _
   ByVal text As String _
) 
'Usage
 
Dim instance As Row
Dim column As Integer
Dim text As String
 
instance.SetText(column, text)
public void SetText( 
   int column,
   string text
)

Parameters

column
The column index.
text
The text for the cell.
Example
This example uses the SetText method.
GcSpreadSheet1.ActiveSheet.Columns[0].SetText(1, "test");
GcSpreadSheet1.ActiveSheet.Columns[0].SetValue(2, 5);
GcSpreadSheet1.ActiveSheet.Rows[3].SetText(1, "C");
GcSpreadSheet1.ActiveSheet.Rows[3].SetValue(3, 10);

private void button1_Click(object sender, RoutedEventArgs e)
{
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Columns[0].GetText(1).ToString());
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Columns[0].GetValue(2).ToString());
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Rows[3].GetValue(1).ToString());
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Rows[3].GetText(3).ToString());
 }
GcSpreadSheet1.ActiveSheet.Columns(0).SetText(1, "test")
GcSpreadSheet1.ActiveSheet.Columns(0).SetValue(2, 5)
GcSpreadSheet1.ActiveSheet.Rows(3).SetText(1, "C")
GcSpreadSheet1.ActiveSheet.Rows(3).SetValue(3, 10)

    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Columns(0).GetText(1).ToString())
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Columns(0).GetValue(2).ToString())
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Rows(3).GetValue(1).ToString())
        ListBox1.Items.Add(GcSpreadSheet1.ActiveSheet.Rows(3).GetText(3).ToString())
    End Sub
See Also

Reference

Row Class
Row Members