次の方法で共有


DetailsViewDesigner.SampleRowCount プロパティ

定義

表示する関連付けられたコントロールのサンプル行の数を取得します。

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

プロパティ値

Int32

表示するサンプル行の数。

次のコード例は、デザイン時にコントロールのポケットベル行に表示されるページ リンクの数を変更するために、クラスからDetailsViewDesigner継承されたクラスのプロパティをオーバーライドSampleRowCountする方法をDetailsView示しています。 この例では、5 つのページ リンクが表示されます。

// Determines the number of page links in the pager row
// when viewed in the designer.
protected override int SampleRowCount
{
    get
    {
        // Render five page links in the pager row.
        return 5;
    }
} // SampleRowCount
' Determines the number of page links in the pager row
' when viewed in the designer.
Protected Overrides ReadOnly Property SampleRowCount() As Integer
    Get
        ' Render five page links in the pager row.
        Return 5
    End Get
End Property ' SampleRowCount

注釈

このプロパティは SampleRowCount 常に数値 2を返します。 これにより、デザイン時にコントロールのポケットベル行に 2 つのページ リンクが DetailsView 表示されます。

適用対象

こちらもご覧ください