ここでは、次のサンプルについて説明します。
Grid binding サンプル
MasterDetails サンプル
Grid binding to a WebService サンプル
Simple Data binding サンプル
ComboBox binding サンプル
Customer Details Form サンプル
Grid binding サンプル
このサンプルでは、DataSet を Windows フォームの Grid コントロールに連結するために使われるメソッドを示します。
オンラインのサンプル ドキュメントへのリンク
オンラインのサンプル ソース コードへのリンク
このサンプルで使用されている名前空間
System、System.Drawing、System.Windows.Forms、System.ComponentModel、System.Data、System.Data.SqlClient
このサンプルで使用されているクラス
Form、Style、DataSet、Cursor、SqlDataAdapter、Table、DataAdapter、TableStyle、Component、Button、DataGrid、Control、SqlConnection、StatusBar、Container、Application、DataGridTableStyle、EventHandler、EventArgs、Thread、SystemColors、Cursors
MasterDetails サンプル
このサンプルでは、1 つの DataSet を使用して 2 つの DataGrid コントロールを作成する方法を示します。2 つの DataGrid コントロール間にはリレーションシップが設定され、最初の DataGrid で顧客が選択されると、その顧客のすべての注文情報が 2 番目の DataGrid に表示されるようになっています。
オンラインのサンプル ドキュメントへのリンク
オンラインのサンプル ソース コードへのリンク
このサンプルで使用されている名前空間
System、System.Drawing、System.Windows.Forms、System.Data、System.ComponentModel、System.Collections、System.ComponentModel.Design、System.Web、System.Web.Services、System.Diagnostics、System.Web.Services.Protocols、System.IO、System.Data.OleDb、System.Data.SqlClient、Microsoft.Win32
このサンプルで使用されているクラス
Type、DataColumn、SqlParameter、Region、DBNull、Exception、DataSet、Table、Form、Style、DataRow、StrongTypingException、InvalidCastException、Convert、Cursor、DataTable、EventHandler、EventArgs、SqlCommand、TableStyle、Component、DataRowChangeEventArgs、DataAdapter、SqlDataAdapter、Service、SystemColors、Message、MessageBox、DataGrid、SqlConnection、Button、DataRowBuilder、Object、WebService、Icon、Control、DataGridTableStyle、Container、Array、DataRelation、DesignerSerializationVisibilityAttribute、Cursors、SqlRowUpdatedEventHandler、StatusBar、Constraint、Attribute、Application、ForeignKeyConstraint、String、RowUpdatedEventArgs、Thread、BindingContext、Context、SqlTransaction、SqlRowUpdatedEventArgs、Binding
Grid binding to a WebService サンプル
このサンプルでは、WebService から DataSet を取得する方法を示します。取得された DataSet は Grid コントロールに連結されます。
オンラインのサンプル ドキュメントへのリンク
オンラインのサンプル ソース コードへのリンク
このサンプルで使用されている名前空間
System、System.Drawing、System.Windows.Forms、System.Data、System.ComponentModel、System.Net、System.Web、System.IO、System.Web.Services、System.Data.OleDb、System.Data.SqlClient
このサンプルで使用されているクラス
DataSet、Form、Style、Service、WebService、Cursor、Binding、Table、Component、TableStyle、Control、SqlDataAdapter、DataAdapter、DataGrid、Button、Container、SqlConnection、StatusBar、EventArgs、EventHandler、Thread、SystemColors、Application、Cursors、DataGridTableStyle
Simple Data binding サンプル
このサンプルでは、データセットから Windows フォーム コントロールへのデータ連結を示します。このサンプルでは、Text コントロールに連結し、カスタム コードのパネルを使用してデータセット内を移動します。
オンラインのサンプル ドキュメントへのリンク
オンラインのサンプル ソース コードへのリンク
このサンプルで使用されている名前空間
System、System.Windows.Forms、System.Drawing、System.ComponentModel、System.Collections、System.Data、System.Data.OleDb、System.IO
このサンプルで使用されているクラス
Form、Style、Binding、TextBox、Component、Control、Label、BindingContext、Context、Button、EventArgs、EventHandler、DataBinding、String、Site、Type、Convert、Panel、StringWriter、Message、Container、ConvertEventHandler、ConvertEventArgs、SystemInformation、Thread、Application、Exception、CollectionBase、Icon、MessageBox
ComboBox binding サンプル
このサンプルでは、DataSet を Windows フォームの ComboBox コントロールに連結するために使われるメソッドを示します。このサンプルで紹介している方法は、他の List コントロールに DataSet を連結するときにも使用できます。
オンラインのサンプル ドキュメントへのリンク
オンラインのサンプル ソース コードへのリンク
このサンプルで使用されている名前空間
System、System.Windows.Forms、System.Drawing、System.ComponentModel、System.Data、System.Data.SqlClient
このサンプルで使用されているクラス
Form、Style、DataSet、Binding、Label、TextBox、Control、BindingContext、Context、Button、ComboBox、DataBinding、EventArgs、EventHandler、Component、Panel、SqlConnection、SqlDataAdapter、Container、DataAdapter、Region、Thread、Application、Pen
Customer Details Form サンプル
このサンプルでは、未接続の DataSet をクライアントで使用して、実際のデータベースが格納されているリモート コンピュータに WebService を通じて更新を提供する方法を示します。
オンラインのサンプル ドキュメントへのリンク
オンラインのサンプル ソース コードへのリンク
このサンプルで使用されている名前空間
System、System.Windows.Forms、System.Drawing、System.Data、System.ComponentModel、System.Web.Services、System.Web、System.ComponentModel.Design、System.Collections、System.IO、System.Data.SqlClient、System.Data.OleDb、Microsoft.Win32
このサンプルで使用されているクラス
Form、DataSet、Style、Control、DataColumn、Type、Button、SqlParameter、Binding、Region、Exception、DataRow、DBNull、EventHandler、EventArgs、BindingContext、Label、Context、TextBox、Cursor、Service、Message、Table、MessageBox、WebService、Convert、Component、StrongTypingException、DataBinding、InvalidCastException、DataTable、SqlCommand、String、Icon、SqlConnection、DataRowChangeEventArgs、DataAdapter、SqlDataAdapter、Panel、Container、StatusBar、ComboBox、DataRowBuilder、Object、DataColumnChangeEventHandler、Cursors、ErrorProvider、DataRowView、StringWriter、SqlTransaction、DesignerSerializationVisibilityAttribute、CancelEventArgs、ContainerControl、SqlRowUpdatedEventArgs、CancelEventHandler、Array、RowUpdatedEventArgs、Thread、SqlRowUpdatedEventHandler、Pen、DataColumnChangeEventArgs、Application、SystemColors、Attribute