Spread Windows Forms 12.0 Product Documentation
SetViewRowIndex Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView.DocumentModels Class : SetViewRowIndex Method
Row index in the data model
Row index in the sheet
Sets the row index in the sheet for the specified row index in the data model.
Syntax
'Declaration
 
Public Sub SetViewRowIndex( _
   ByVal modelRowIndex As Integer, _
   ByVal value As Integer _
) 
'Usage
 
Dim instance As SheetView.DocumentModels
Dim modelRowIndex As Integer
Dim value As Integer
 
instance.SetViewRowIndex(modelRowIndex, value)
public void SetViewRowIndex( 
   int modelRowIndex,
   int value
)

Parameters

modelRowIndex
Row index in the data model
value
Row 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 rows in the models have been mapped to different row 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())
See Also

Reference

SheetView.DocumentModels Class
SheetView.DocumentModels Members