Spread Windows Forms 9.0 Product Documentation
SetViewColumnIndex Method
Example 


Column index in the model
Column index in the sheet
Sets the column index in the sheet for the specified column index in the data model.
Syntax
'Declaration
 
Public Sub SetViewColumnIndex( _
   ByVal modelColumnIndex As Integer, _
   ByVal value As Integer _
) 
'Usage
 
Dim instance As SheetView.DocumentModels
Dim modelColumnIndex As Integer
Dim value As Integer
 
instance.SetViewColumnIndex(modelColumnIndex, value)
public void SetViewColumnIndex( 
   int modelColumnIndex,
   int value
)

Parameters

modelColumnIndex
Column index in the model
value
Column index in the sheet
Remarks

The row and column indexes in the SheetView are the same as the ones in the models until a mapping is created. This method determines whether any columns in the models have been mapped to different column indexes in the view (displayed sheet).

This method will cause cell spans to become invisible if it causes a change to the mappings.

Example
This example returns if any mappings are set.
fpSpread1.ActiveSheet.Models.SetViewColumnIndex(2,0); 
fpSpread1.ActiveSheet.Models.SetViewRowIndex(1,0);
bool b = fpSpread1.ActiveSheet.Models.IsAnyColumnViewIndexSet();
MessageBox.Show("Mappings set for columns is " + b.ToString());
b = fpSpread1.ActiveSheet.Models.IsAnyRowViewIndexSet();
MessageBox.Show("Mappings set for rows is " + b.ToString());
FpSpread1.ActiveSheet.Models.SetViewColumnIndex(2,0)
FpSpread1.ActiveSheet.Models.SetViewRowIndex(1,0)
dim b As Boolean = FpSpread1.ActiveSheet.Models.IsAnyColumnViewIndexSet()
MessageBox.Show("Mappings are set for columns is " + b.ToString())
b = FpSpread1.ActiveSheet.Models.IsAnyRowViewIndexSet()
MessageBox.Show("Mappings are set for rows is " & b.ToString())
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetView.DocumentModels Class
SheetView.DocumentModels Members

 

 


Copyright © GrapeCity, inc. All rights reserved.