Spread for ASP.NET 10 Product Documentation
MoveColumn Method (SheetView)
Example 


Moves the column or columns to a specified location.
Overload List
OverloadDescription
MoveColumnMoves the column or columns to a specified location.  
Remarks

Use this method to move the data and formatting in a range of columns in the sheet. It cuts and moves all contents to the column in front of the specified destination column.

Moving a range of columns with this method moves the data and formatting, including formulas and cell notes.

Moving a range of columns with this method cuts the columns and pastes them in front of the specified location. The pasted columns are inserted before the specified column. For example, moving columns B and C to column F cuts columns B and C and pastes them in front of column F.

Example
This example moves two columns.
FarPoint.Web.Spread.SheetView sv;
sv = FpSpread1.ActiveSheetView;
sv.SetValue(0, 0, 1);
sv.SetValue(0, 1, 2);
sv.SetValue(0, 2, 3);
sv.SetValue(0, 3, 4);

sv.MoveColumn(0, 1, 2);
Dim sv As FarPoint.Web.Spread.SheetView
sv = FpSpread1.ActiveSheetView
sv.SetValue(0, 0, "One")
sv.SetValue(0, 1, "Two")
sv.SetValue(0, 2, "Three")
sv.SetValue(0, 3, "Four")

sv.MoveColumn(0, 1, 2)
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

SheetView Class
SheetView Members

User-Task Documentation

Allowing the User to Move Columns

 

 


Copyright © GrapeCity, inc. All rights reserved.