Spread Windows Forms 12.0 Product Documentation
GetRowPageBreaks(Int32,Boolean) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class > GetRowPageBreaks Method : GetRowPageBreaks(Int32,Boolean) Method
Sheet index for which to return row page breaks
Whether to recalculate the page break
Gets the row page breaks for the specified sheet under the current printing conditions with the option to recalculate.
Syntax
'Declaration
 
Public Overloads Function GetRowPageBreaks( _
   ByVal sheet As Integer, _
   ByVal reCalc As Boolean _
) As Integer()
'Usage
 
Dim instance As FpSpread
Dim sheet As Integer
Dim reCalc As Boolean
Dim value() As Integer
 
value = instance.GetRowPageBreaks(sheet, reCalc)
public int[] GetRowPageBreaks( 
   int sheet,
   bool reCalc
)

Parameters

sheet
Sheet index for which to return row page breaks
reCalc
Whether to recalculate the page break

Return Value

Integer array containing the indexes of rows for which page breaks occur
Remarks

The reCalc parameter is for optimization; if the GetColumnPageBreaks method is called before this method, set this parameter to false.

Example
This example sets and gets row page breaks.
// Add this code to form load
FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo();
pi.UseMax =false;
fpSpread1.Sheets[0].PrintInfo=pi;
fpSpread1.Sheets[0].SetRowPageBreak(5,true);

// Add this code to a button click event
int []i;
i = fpSpread1.GetRowPageBreaks(0,true);
foreach (object o in i)
{
listBox1.Items.Add(o);
} 

Dim pi As New FarPoint.Win.Spread.PrintInfo()
pi.UseMax = False
FpSpread1.Sheets(0).PrintInfo = pi
FpSpread1.Sheets(0).SetRowPageBreak(5, True)

'Code in button click event
 Dim i() As Integer
 Dim o As Object
 i = FpSpread1.GetRowPageBreaks(0, True)
        For Each o In i
            ListBox1.Items.Add(o)
        Next
See Also

Reference

FpSpread Class
FpSpread Members
Overload List