Spread Silverlight Documentation
FindTable(Int32,Int32) Method
Example 


The row index.
The column index.
Gets the table of the specified cell.
Syntax
'Declaration
 
Public Overloads Function FindTable( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer _
) As SheetTable
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim value As SheetTable
 
value = instance.FindTable(row, column)
public SheetTable FindTable( 
   System.int row,
   System.int column
)

Parameters

row
The row index.
column
The column index.

Return Value

The table instance if the cell belongs to a table; otherwise, null.
Example
This example uses the FindTable method.
private void Window_Loaded(object sender, RoutedEventArgs e)
       {
           gcSpreadSheet1.Sheets[0].Cells[1,1].Text = "Last Name";
           gcSpreadSheet1.Sheets[0].Cells[1, 2].Text = "Value";
           gcSpreadSheet1.Sheets[0].Cells[2, 1].Text = "Smith";
           gcSpreadSheet1.Sheets[0].Cells[2, 2].Value = 50;
           gcSpreadSheet1.Sheets[0].Cells[3, 1].Text = "Vil";
           gcSpreadSheet1.Sheets[0].Cells[3, 2].Value = 10;
           gcSpreadSheet1.Sheets[0].Cells[4, 1].Text = "Press";
           gcSpreadSheet1.Sheets[0].Cells[4, 2].Value = 78;        
           gcSpreadSheet1.Sheets[0].AddTable("Table1", 1, 1, 5, 2);           
           gcSpreadSheet1.Invalidate();                 
       }

       private void button1_Click(object sender, RoutedEventArgs e)
       {
           //listBox1.Items.Add(gcSpreadSheet1.Sheets[0].FindTable(1, 1).Name.ToString());
           //listBox1.Items.Add(gcSpreadSheet1.Sheets[0].FindTable("Table1").ShowHeader.ToString());
           //gcSpreadSheet1.Sheets[0].RemoveTable("Table1");
           //gcSpreadSheet1.Sheets[0].MoveTable("Table1", 3, 2);
           //gcSpreadSheet1.Sheets[0].ResizeTable("Table1", 6, 3);
           gcSpreadSheet1.Invalidate();
       }
Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
        GcSpreadSheet1.Sheets(0).Cells(1, 1).Text = "Last Name"
        GcSpreadSheet1.Sheets(0).Cells(1, 2).Text = "Value"
        GcSpreadSheet1.Sheets(0).Cells(2, 1).Text = "Smith"
        GcSpreadSheet1.Sheets(0).Cells(2, 2).Value = 50
        GcSpreadSheet1.Sheets(0).Cells(3, 1).Text = "Vil"
        GcSpreadSheet1.Sheets(0).Cells(3, 2).Value = 10
        GcSpreadSheet1.Sheets(0).Cells(4, 1).Text = "Press"
        GcSpreadSheet1.Sheets(0).Cells(4, 2).Value = 78
        GcSpreadSheet1.Sheets(0).AddTable("Table1", 1, 1, 5, 2)
        GcSpreadSheet1.Invalidate()
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        'ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).FindTable(1, 1).Name.ToString())
        'ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).FindTable("Table1").ShowHeader.ToString())
        'GcSpreadSheet1.Sheets(0).RemoveTable("Table1")
        'GcSpreadSheet1.Sheets(0).MoveTable("Table1", 3, 2)
        'GcSpreadSheet1.Sheets(0).ResizeTable("Table1", 6, 3)
        GcSpreadSheet1.Invalidate()
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.