FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class : Move Method |
'Declaration Public Sub Move( _ ByVal fromRow As Integer, _ ByVal fromColumn As Integer, _ ByVal toRow As Integer, _ ByVal toColumn As Integer, _ ByVal rowCount As Integer, _ ByVal columnCount As Integer _ )
Exception | Description |
---|---|
System.ArgumentException | Specified starting and ending row or row count is not valid |
System.ArgumentException | Specified starting and ending column or column count is not valid |
This method moves the data of the range of cells.
The destination column and row indicate the upper left cell of the destination block. The contents of the destination block cells are replaced by the moved cells' contents.
Caution: Moving a range of cells pastes them over existing cells. You might want to caution users and have them verify a move command before overwriting their existing data.
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load If(Me.IsPostBack)Then Return FpSpread1.ActiveSheetView.DataModel.SetValue(0,0,"FarPoint") FpSpread1.ActiveSheetView.DataModel.SetValue(0,1,"Technologies") End Sub Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Button1.Click Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel=CType(FpSpread1.ActiveSheetView.DataModel,FarPoint.Web.Spread.Model.DefaultSheetDataModel) dm.Move(0,0,2,2,1,2) End Sub
private void Page_Load(object sender,System.EventArgs e) { if(this.IsPostBack)return; FpSpread1.ActiveSheetView.DataModel.SetValue(0,0,"FarPoint"); FpSpread1.ActiveSheetView.DataModel.SetValue(0,1,"Technologies"); } private void Button1_Click(object sender,System.EventArgs e) { FarPoint.Web.Spread.Model.DefaultSheetDataModel dm=(FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel; dm.Move(0,0,2,2,1,2); }
Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional