Spread Silverlight Documentation
AddRowViewport(Int32,Double) Method
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class : AddRowViewport(Int32,Double) Method
The row viewport index to add.
The row viewport height.
Adds a new row viewport to the control.
Syntax
'Declaration
 
Public Sub AddRowViewport( _
   ByVal rowViewportIndex As System.Integer, _
   ByVal viewportHeight As System.Double _
) 
'Usage
 
Dim instance As GcSpreadSheet
Dim rowViewportIndex As System.Integer
Dim viewportHeight As System.Double
 
instance.AddRowViewport(rowViewportIndex, viewportHeight)
public void AddRowViewport( 
   System.int rowViewportIndex,
   System.double viewportHeight
)

Parameters

rowViewportIndex
The row viewport index to add.
viewportHeight
The row viewport height.
Example
This example uses the AddRowViewport method.
    gcSpreadSheet1.AddColumnViewport(0, 100);
    gcSpreadSheet1.AddRowViewport(0, 80);
    gcSpreadSheet1.RowSplitBoxAlignment = GrapeCity.Windows.SpreadSheet.UI.SplitBoxAlignment.Leading;
    gcSpreadSheet1.ColumnSplitBoxAlignment = GrapeCity.Windows.SpreadSheet.UI.SplitBoxAlignment.Trailing;
    gcSpreadSheet1.Sheets[0].SetViewportHeight(0, 100);
    gcSpreadSheet1.Sheets[0].SetViewportWidth(0, 100);
    gcSpreadSheet1.Invalidate();           
      
private void button1_Click(object sender, RoutedEventArgs e)
{
    gcSpreadSheet1.RemoveColumnViewport(0);
    gcSpreadSheet1.RemoveRowViewport(0);
    gcSpreadSheet1.Invalidate();
}
            GcSpreadSheet1.AddColumnViewport(0, 100)
            GcSpreadSheet1.AddRowViewport(0, 80)
            GcSpreadSheet1.RowSplitBoxAlignment = GrapeCity.Windows.SpreadSheet.UI.SplitBoxAlignment.Leading
            GcSpreadSheet1.ColumnSplitBoxAlignment = GrapeCity.Windows.SpreadSheet.UI.SplitBoxAlignment.Trailing
            GcSpreadSheet1.Sheets[0].SetViewportHeight(0, 100)
            GcSpreadSheet1.Sheets[0].SetViewportWidth(0, 100)
            GcSpreadSheet1.Invalidate()    

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
      GcSpreadSheet1.RemoveColumnViewport(0)
      GcSpreadSheet1.RemoveRowViewport(0)
      GcSpreadSheet1.Invalidate()
End Sub
See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members