Επεξεργασία

Κοινή χρήση μέσω


FormViewDesigner.SampleRowCount Property

Definition

Gets the number of sample rows for the associated control to display.

protected:
 virtual property int SampleRowCount { int get(); };
protected override int SampleRowCount { get; }
member this.SampleRowCount : int
Protected Overrides ReadOnly Property SampleRowCount As Integer

Property Value

The number of sample rows.

Examples

The following code example shows how to override the SampleRowCount property in a class that is inherited from the FormViewDesigner class to change the number of page links appearing in the pager row of the FormView control at design time. The example causes four page links to display.

// Determines the number of design-time links in the pager row.
protected override int SampleRowCount
{
    get
    {
        // Render four links in the pager row.
        return 4;
    }
} // SampleRowCount
' Determines the number of design-time links in the pager row.
Protected Overrides ReadOnly Property SampleRowCount() As Integer
    Get
        ' Render four links in the pager row.
        Return 4
    End Get
End Property ' SampleRowCount

Remarks

The SampleRowCount always returns 2. This causes two page links to be displayed in the pager row of the FormView control at design time, if the PagerSettings mode is numeric.

Applies to

See also