GrapeCity.Xaml.SpreadSheet.Data
MoveTable(SheetTable,Int32,Int32) Method
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class > MoveTable Method : MoveTable(SheetTable,Int32,Int32) Method
The table instance to move.
The new row index.
The new column index.
Changes the table location.
Syntax
'Declaration
 
Public Overloads Sub MoveTable( _
   ByVal table As SheetTable, _
   ByVal row As Integer, _
   ByVal column As Integer _
) 
'Usage
 
Dim instance As Worksheet
Dim table As SheetTable
Dim row As Integer
Dim column As Integer
 
instance.MoveTable(table, row, column)
public void MoveTable( 
   SheetTable table,
   int row,
   int column
)

Parameters

table
The table instance to move.
row
The new row index.
column
The new column index.
Remarks
The row and column index should be the top, left table cell.
Example
This example uses the MoveTable method.
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);  

GrapeCity.Xaml.SpreadSheet.Data.SheetTable ntable = new GrapeCity.Xaml.SpreadSheet.Data.SheetTable();
ntable = gcSpreadSheet1.Sheets[0].FindTable("Table1");
gcSpreadSheet1.Sheets[0].MoveTable(ntable, 3, 3);
//gcSpreadSheet1.Sheets[0].ResizeTable(ntable, 6, 3);   
//gcSpreadSheet1.Sheets[0].RemoveTable(ntable);
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)

Dim ntable As New GrapeCity.Xaml.SpreadSheet.Data.SheetTable()
ntable = GcSpreadSheet1.Sheets(0).FindTable("Table1")
GcSpreadSheet1.Sheets(0).MoveTable(ntable, 3, 3)
'GcSpreadSheet1.Sheets(0).ResizeTable(ntable, 6, 3)   
'GcSpreadSheet1.Sheets(0).RemoveTable(ntable)
See Also

Reference

Worksheet Class
Worksheet Members
Overload List