FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class : Swap Method |
'Declaration Public Sub Swap( _ 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 |
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load If(IsPostBack)Then Return Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel=New FarPoint.Web.Spread.Model.DefaultSheetDataModel(10,10) FpSpread1.ActiveSheetView.DataModel=dm dm.SetValue(0,0,1) dm.SetValue(0,1,2) dm.SetValue(0,2,3) dm.SetValue(0,3,4) dm.SetValue(0,4,5) dm.SetValue(0,5,6) dm.SetValue(1,0,100) dm.SetValue(1,1,99) dm.SetValue(1,2,98) dm.SetValue(1,3,97) dm.SetValue(1,4,96) dm.SetValue(1,5,95) End Sub Private Sub Button1_Click(ByVal sender As Object,ByVal e As System.EventArgs)Handles Button1.Click Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel=FpSpread1.ActiveSheetView.DataModel dm.Swap(0,0,0,2,2,2) End Sub
private void Page_Load(object sender,System.EventArgs e) { if(this.IsPostBack)return; FpSpread1.ActiveSheetView.RowCount=10; FpSpread1.ActiveSheetView.ColumnCount=10; FpSpread1.ActiveSheetView.SetValue(0,0,1); FpSpread1.ActiveSheetView.SetValue(0,1,2); FpSpread1.ActiveSheetView.SetValue(0,2,3); FpSpread1.ActiveSheetView.SetValue(0,3,4); FpSpread1.ActiveSheetView.SetValue(0,4,5); FpSpread1.ActiveSheetView.SetValue(0,5,6); FpSpread1.ActiveSheetView.SetValue(1,0,100); FpSpread1.ActiveSheetView.SetValue(1,1,99); FpSpread1.ActiveSheetView.SetValue(1,2,98); FpSpread1.ActiveSheetView.SetValue(1,3,97); FpSpread1.ActiveSheetView.SetValue(1,4,96); FpSpread1.ActiveSheetView.SetValue(1,5,95); } private void Button1_Click(object sender,System.EventArgs e) { FarPoint.Web.Spread.Model.DefaultSheetDataModel dm=(FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel; dm.Swap(0,0,0,2,2,2); }
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6