BindingNavigator.BindingSource プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BindingNavigator.BindingSource プロパティの意味・解説 

BindingNavigator.BindingSource プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

データ ソースとなる System.Windows.Forms.BindingSource コンポーネントを取得または設定します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Property BindingSource As
 BindingSource
Dim instance As BindingNavigator
Dim value As BindingSource

value = instance.BindingSource

instance.BindingSource = value
public BindingSource BindingSource { get; set;
 }
public:
property BindingSource^ BindingSource {
    BindingSource^ get ();
    void set (BindingSource^ value);
}
/** @property */
public BindingSource get_BindingSource ()

/** @property */
public void set_BindingSource (BindingSource
 value)
public function get BindingSource
 () : BindingSource

public function set BindingSource
 (value : BindingSource)

プロパティ値
BindingNavigator に関連付けられている System.Windows.Forms.BindingSource コンポーネント。既定値は null 参照 (Visual Basic では Nothing) です。

解説解説

BindingSource プロパティは、BindingNavigator を使用して移動するデータ ソースを表します。具体的には、BindingSource の List プロパティが、実際のデータ一覧を表します。

これは、BindingNavigator クラスの既定のプロパティです。

使用例使用例

次のコード例は、BindingNavigator コントロールを使用して、データベース クエリの結果間を移動する方法を示しています。結果セットは DataSet に格納されており、このデータ セットは TextBox コントロールおよび BindingSource コンポーネントにバインドされています。このコード例は 方法 : Windows フォームの BindingNavigator コントロールを使用して DataSet を移動する の例の一部です。

Public Sub New()
    ' Set up the BindingSource component.
    Me.customersBindingNavigator.BindingSource = Me.customersBindingSource
    Me.customersBindingNavigator.Dock = DockStyle.Top
    Me.Controls.Add(Me.customersBindingNavigator)

    ' Set up the TextBox control for displaying company names.
    Me.companyNameTextBox.Dock = DockStyle.Bottom
    Me.Controls.Add(Me.companyNameTextBox)

    ' Set up the form.
    Me.Size = New Size(800, 200)
    AddHandler Me.Load, AddressOf
 Form1_Load
End Sub
public Form1()
{
    // Set up the BindingSource component.
    this.customersBindingNavigator.BindingSource = this.customersBindingSource;
    this.customersBindingNavigator.Dock = DockStyle.Top;
    this.Controls.Add(this.customersBindingNavigator);

    // Set up the TextBox control for displaying company names.
    this.companyNameTextBox.Dock = DockStyle.Bottom;
    this.Controls.Add(this.companyNameTextBox);

    // Set up the form.
    this.Size = new Size(800, 200);
    this.Load += new EventHandler(Form1_Load);
}
public:
    Form1()
    {
        // Set up the BindingSource component.
        this->customersBindingSource = gcnew BindingSource();
        this->companyNameTextBox = gcnew TextBox();
        this->customersBindingNavigator = gcnew BindingNavigator();
        this->customersBindingNavigator->BindingSource =
            this->customersBindingSource;
        this->customersBindingNavigator->Dock = DockStyle::Top;
        this->Controls->Add(this->customersBindingNavigator);

        // Set up the TextBox control for displaying company names.
        this->companyNameTextBox->Dock = DockStyle::Bottom;
        this->Controls->Add(this->companyNameTextBox);

        // Set up the form.
        this->Size = System::Drawing::Size(800, 200);
        this->Load += gcnew EventHandler(this,
 &Form1::Form1_Load);
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
BindingNavigator クラス
BindingNavigator メンバ
System.Windows.Forms 名前空間
System.Windows.Forms.BindingSource
List



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「BindingNavigator.BindingSource プロパティ」の関連用語

BindingNavigator.BindingSource プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BindingNavigator.BindingSource プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS