DetailsViewDesigner.SampleRowCount Properti

Definisi

Mendapatkan jumlah baris sampel untuk kontrol terkait yang akan ditampilkan.

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

Nilai Properti

Jumlah baris sampel yang akan ditampilkan.

Contoh

Contoh kode berikut menunjukkan cara mengambil alih SampleRowCount properti di kelas yang diwarisi dari DetailsViewDesigner kelas untuk mengubah jumlah tautan halaman yang muncul di baris pager kontrol pada DetailsView waktu desain. Contoh menyebabkan lima tautan halaman ditampilkan.

// 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

Keterangan

Properti SampleRowCount selalu mengembalikan angka 2. Ini menyebabkan dua tautan halaman ditampilkan di baris pager kontrol pada DetailsView waktu desain.

Berlaku untuk

Lihat juga