DataGridTableStyle イベント

名前 | 説明 | |
---|---|---|
![]() | Disposed | コンポーネントの Disposed イベントを待機するイベント ハンドラを追加します。 ( Component から継承されます。) |
![]() | ForeColorChanged | ForeColor の値が変更された場合に発生します。 |
![]() | GridLineColorChanged | GridLineColor の値が変更された場合に発生します。 |
![]() | GridLineStyleChanged | GridLineStyle の値が変更された場合に発生します。 |
![]() | HeaderBackColorChanged | HeaderBackColor の値が変更された場合に発生します。 |
![]() | HeaderFontChanged | HeaderFont の値が変更された場合に発生します。 |
![]() | HeaderForeColorChanged | HeaderForeColor の値が変更された場合に発生します。 |
![]() | LinkColorChanged | LinkColor の値が変更された場合に発生します。 |
![]() | LinkHoverColorChanged | LinkHoverColor の値が変更された場合に発生します。 |
![]() | MappingNameChanged | MappingName の値が変更された場合に発生します。 |
![]() | PreferredColumnWidthChanged | PreferredColumnWidth プロパティの値が変更された場合に発生します。 |
![]() | PreferredRowHeightChanged | PreferredRowHeight の値が変更された場合に発生します。 |
![]() | ReadOnlyChanged | ReadOnly の値が変更された場合に発生します。 |
![]() | RowHeadersVisibleChanged | RowHeadersVisible の値が変更された場合に発生します。 |
![]() | RowHeaderWidthChanged | RowHeaderWidth の値が変更された場合に発生します。 |
![]() | SelectionBackColorChanged | SelectionBackColor の値が変更された場合に発生します。 |
![]() | SelectionForeColorChanged | SelectionForeColor の値が変更された場合に発生します。 |

関連項目
DataGridTableStyle クラスSystem.Windows.Forms 名前空間
DataGrid クラス
DataGridColumnStyle クラス
GridColumnStylesCollection
GridTableStylesCollection
DataGridTableStyle クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


System.Windows.Forms.DataGrid コントロールは、グリッド形式でデータを表示します。DataGridTableStyle は、描画されたグリッドだけを表すクラスです。このグリッドは、グリッドのデータ ソースとなる DataTable クラスとは区別する必要があります。DataGridTableStyle は、コントロールで描画されたとおりに正確にグリッドを表します。このため、DataGridTableStyle を使用すると、各 DataTable のグリッドの外観を制御できます。特定の DataTable のデータを表示するときに使用する DataGridTableStyle を指定するには、MappingName を DataTable の TableName に設定します。
TableStyles プロパティによって取得される GridTableStylesCollection には、System.Windows.Forms.DataGrid コントロールで使用される DataGridTableStyle オブジェクトがすべて格納されます。このコレクションには、必要な数の DataGridTableStyle オブジェクトを格納できますが、各オブジェクトの MappingName は一意である必要があります。これにより、同じデータに対して、ユーザー設定に応じて実行時に異なる DataGridTableStyle を適用できます。上記の処理を実現するには、次の操作を実行します。
-
GridTableStylesCollection に DataGridTableStyle オブジェクトを格納します。DataGridTableStyle が GridTableStylesCollection 内に存在し、その MappingName プロパティ値が DataTable オブジェクトの TableName プロパティと等しい場合、DataTable はこの DataGridTableStyle を使用して表示されます。一致する MappingName 値を持つ DataGridTableStyle が存在しない場合、DataTable はデータ グリッド テーブルの既定のスタイルを使用して表示されます。
-
別のグリッド スタイルが必要な場合は、Item プロパティを使用して、適切な DataGridTableStyle を選択し (TableName を Item プロパティに渡す)、返されたオブジェクトの MappingName を新しい値に設定します。
-
Item プロパティを使用して必要な DataGridTableStyle を選択し、その MappingName を DataTable の TableName に設定します。
![]() |
---|
必ず DataGridColumnStyle オブジェクトを作成して GridColumnStylesCollection に追加してから、DataGridTableStyle オブジェクトを GridTableStylesCollection に追加します。有効な MappingName 値を持つ空の DataGridTableStyle をコレクションに追加すると、自動的に DataGridColumnStyle オブジェクトが生成されます。そのため、MappingName 値が重複する新しい DataGridColumnStyle オブジェクトを GridColumnStylesCollection に追加しようとすると、例外がスローされます。 |
現在表示されている DataGridTableStyle を確認するには、System.Windows.Forms.DataGrid の DataSource プロパティと DataMember プロパティを使用して、CurrencyManager を返します。データ ソースに ITypedList インターフェイスが実装されている場合は、GetListName メソッドを使用すると、現在のテーブルの MappingName を返すことができます。上記の例を次の C# コードに示します。
private void PrintCurrentListName(DataGrid myDataGrid){ CurrencyManager myCM = (CurrencyManager) BindingContext[myDataGrid.DataSource, myDataGrid.DataMember]; IList myList = myCM.List; ITypedList thisList = (ITypedList) myList; Console.WriteLine(thisList.GetListName(null)); }
DataSet 内に DataRelation オブジェクトによって関連付けられている複数の DataTable オブジェクトが格納されていて、現在表示されている DataTable が子テーブルである場合、DataMember は、TableName.RelationName という形式 (最も簡単な場合) の文字列を返します。DataTable が階層構造内のさらに下位に位置する場合、この文字列は、親テーブルの名前に、そのテーブルのレベルに到達するために必要な RelationName 値が続く形で表されます。たとえば、階層的なリレーションシップを持ち、上から順に Regions、Customers、および Orders という名前が付いている 3 つの DataTable オブジェクトと、RegionsToCustomers および CustomersToOrders という名前の 2 つの DataRelation オブジェクトがある場合、DataMember プロパティは、"Regions.RegionsToCustomers.CustomersToOrders" を返します。ただし、この場合の MappingName は "Orders" になります。
DataGridTableStyle オブジェクトのコレクションは、System.Windows.Forms.DataGrid の TableStyles プロパティによって返されます。
DataGridTableStyle が表示されると、その DataGridTableStyle の設定値によって System.Windows.Forms.DataGrid コントロールの設定値がオーバーライドされます。特定の DataGridTableStyle プロパティに値が設定されていない場合は、代わりに System.Windows.Forms.DataGrid コントロールの値が使用されます。System.Windows.Forms.DataGrid コントロールのプロパティをオーバーライドするために設定できる DataGridColumnStyle プロパティを次に示します。
-
AllowSorting
-
AlternatingBackColor
-
ColumnHeadersVisible
-
ForeColor
-
GridLineColor
-
GridLineStyle
-
HeaderBackColor
-
HeaderFont
-
HeaderForeColor
-
LinkColor
-
PreferredColumnWidth
-
PreferredRowHeight
-
RowHeadersVisible
-
RowHeaderWidth
-
SelectionBackColor
-
SelectionForeColor
DataGrid をオブジェクトの厳密に型指定された配列にバインドするには、オブジェクト型にパブリック プロパティが含まれている必要があります。配列を表示する DataGridTableStyle を作成するには、DataGridTableStyle.MappingName プロパティを typename に設定します。なお、この typename は実際のオブジェクト型名に置き換えてください。また、MappingName プロパティでは大文字と小文字が区別されることに注意してください。型の名前は正確に指定する必要があります。例については、MappingName プロパティのトピックを参照してください。
また、DataGrid を ArrayList にバインドできます。ArrayList の特長は、複数の型のオブジェクトを格納できることです。ただし、DataGrid はリスト内のすべての項目の型が 1 番目の項目の型と同じ場合に限り、リストにバインドできます。つまり、すべてのオブジェクトの型が同じであるか、リスト内の最初の項目と同じクラスからすべてのクラスが継承している必要があります。たとえば、リスト内の最初の項目が Control の場合、2 番目の項目は (Control から継承した) TextBox にできます。逆に、1 番目の項目が TextBox の場合、2 番目のオブジェクトが Control になることはできません。さらに、ArrayList がバインドされている場合には項目が含まれている必要があり、DataGridTableStyle 内のオブジェクトにパブリック プロパティが含まれている必要があります。空の ArrayList の場合、空のグリッドとなります。ArrayList にバインディングするときは、DataGridTableStyle の MappingName を "ArrayList" (型の名前) に設定します。

2 つの DataGridTableStyle インスタンスを作成し、各オブジェクトの MappingName を DataSet 内の DataTable の TableName に設定するコード例を次に示します。さらに、この例では DataGridColumnStyle オブジェクトを各 DataGridTableStyle オブジェクトの GridColumnStylesCollection に追加しています。実行例については、System.Windows.Forms.DataGrid のトピックを参照してください。
Private Sub AddCustomDataTableStyle() ' Create a new DataGridTableStyle and set ' its MappingName to the TableName of a DataTable. Dim ts1 As New DataGridTableStyle() ts1.MappingName = "Customers" ' Add a GridColumnStyle and set its MappingName ' to the name of a DataColumn in the DataTable. ' Set the HeaderText and Width properties. Dim boolCol As New DataGridBoolColumn() boolCol.MappingName = "Current" boolCol.HeaderText = "IsCurrent Customer" boolCol.Width = 150 ts1.GridColumnStyles.Add(boolCol) ' Add a second column style. Dim TextCol As New DataGridTextBoxColumn() TextCol.MappingName = "custName" TextCol.HeaderText = "Customer Name" TextCol.Width = 250 ts1.GridColumnStyles.Add(TextCol) ' Create the second table style with columns. Dim ts2 As New DataGridTableStyle() ts2.MappingName = "Orders" ' Change the colors. ts2.ForeColor = Color.Yellow ts2.AlternatingBackColor = Color.Blue ts2.BackColor = Color.Blue ' Create new DataGridColumnStyle objects. Dim cOrderDate As New DataGridTextBoxColumn() cOrderDate.MappingName = "OrderDate" cOrderDate.HeaderText = "Order Date" cOrderDate.Width = 100 ts2.GridColumnStyles.Add(cOrderDate) Dim pcol As PropertyDescriptorCollection = Me.BindingContext(myDataSet, "Customers.custToOrders").GetItemProperties() Dim csOrderAmount As New DataGridTextBoxColumn(pcol("OrderAmount"), "c", True) csOrderAmount.MappingName = "OrderAmount" csOrderAmount.HeaderText = "Total" csOrderAmount.Width = 100 ts2.GridColumnStyles.Add(csOrderAmount) ' Add the DataGridTableStyle objects to the collection. myDataGrid.TableStyles.Add(ts1) myDataGrid.TableStyles.Add(ts2) End Sub 'AddCustomDataTableStyle
private void AddCustomDataTableStyle() { /* Create a new DataGridTableStyle and set its MappingName to the TableName of a DataTable. */ DataGridTableStyle ts1 = new DataGridTableStyle(); ts1.MappingName = "Customers"; /* Add a GridColumnStyle and set its MappingName to the name of a DataColumn in the DataTable. Set the HeaderText and Width properties. */ DataGridColumnStyle boolCol = new DataGridBoolColumn(); boolCol.MappingName = "Current"; boolCol.HeaderText = "IsCurrent Customer"; boolCol.Width = 150; ts1.GridColumnStyles.Add(boolCol); // Add a second column style. DataGridColumnStyle TextCol = new DataGridTextBoxColumn(); TextCol.MappingName = "custName"; TextCol.HeaderText = "Customer Name"; TextCol.Width = 250; ts1.GridColumnStyles.Add(TextCol); // Create the second table style with columns. DataGridTableStyle ts2 = new DataGridTableStyle(); ts2.MappingName = "Orders"; // Change the colors. ts2.ForeColor = Color.Yellow; ts2.AlternatingBackColor = Color.Blue; ts2.BackColor = Color.Blue; // Create new DataGridColumnStyle objects. DataGridColumnStyle cOrderDate = new DataGridTextBoxColumn(); cOrderDate.MappingName = "OrderDate"; cOrderDate.HeaderText = "Order Date"; cOrderDate.Width = 100; ts2.GridColumnStyles.Add(cOrderDate); PropertyDescriptorCollection pcol = this.BindingContext [myDataSet, "Customers.custToOrders"].GetItemProperties(); DataGridColumnStyle csOrderAmount = new DataGridTextBoxColumn(pcol["OrderAmount"], "c", true); csOrderAmount.MappingName = "OrderAmount"; csOrderAmount.HeaderText = "Total"; csOrderAmount.Width = 100; ts2.GridColumnStyles.Add(csOrderAmount); // Add the DataGridTableStyle objects to the collection. myDataGrid.TableStyles.Add(ts1); myDataGrid.TableStyles.Add(ts2); }
void AddCustomDataTableStyle() { /* Create a new DataGridTableStyle and set its MappingName to the TableName of a DataTable. */ DataGridTableStyle^ ts1 = gcnew DataGridTableStyle; ts1->MappingName = "Customers"; /* Add a GridColumnStyle and set its MappingName to the name of a DataColumn in the DataTable. Set the HeaderText and Width properties. */ DataGridColumnStyle^ boolCol = gcnew DataGridBoolColumn; boolCol->MappingName = "Current"; boolCol->HeaderText = "IsCurrent Customer"; boolCol->Width = 150; ts1->GridColumnStyles->Add( boolCol ); // Add a second column style. DataGridColumnStyle^ TextCol = gcnew DataGridTextBoxColumn; TextCol->MappingName = "custName"; TextCol->HeaderText = "Customer Name"; TextCol->Width = 250; ts1->GridColumnStyles->Add( TextCol ); // Create the second table style with columns. DataGridTableStyle^ ts2 = gcnew DataGridTableStyle; ts2->MappingName = "Orders"; // Change the colors. ts2->ForeColor = Color::Yellow; ts2->AlternatingBackColor = Color::Blue; ts2->BackColor = Color::Blue; // Create new DataGridColumnStyle objects. DataGridColumnStyle^ cOrderDate = gcnew DataGridTextBoxColumn; cOrderDate->MappingName = "OrderDate"; cOrderDate->HeaderText = "Order Date"; cOrderDate->Width = 100; ts2->GridColumnStyles->Add( cOrderDate ); PropertyDescriptorCollection^ pcol = this->BindingContext[ myDataSet,"Customers.custToOrders" ]->GetItemProperties(); DataGridColumnStyle^ csOrderAmount = gcnew DataGridTextBoxColumn( pcol[ "OrderAmount" ],"c",true ); csOrderAmount->MappingName = "OrderAmount"; csOrderAmount->HeaderText = "Total"; csOrderAmount->Width = 100; ts2->GridColumnStyles->Add( csOrderAmount ); // Add the DataGridTableStyle objects to the collection. myDataGrid->TableStyles->Add( ts1 ); myDataGrid->TableStyles->Add( ts2 ); }
private void AddCustomDataTableStyle() { /* Create a new DataGridTableStyle and set its MappingName to the TableName of a DataTable. */ DataGridTableStyle ts1 = new DataGridTableStyle(); ts1.set_MappingName("Customers"); /* Add a GridColumnStyle and set its MappingName to the name of a DataColumn in the DataTable. Set the HeaderText and Width properties. */ DataGridColumnStyle boolCol = new DataGridBoolColumn(); boolCol.set_MappingName("Current"); boolCol.set_HeaderText("IsCurrent Customer"); boolCol.set_Width(150); ts1.get_GridColumnStyles().Add(boolCol); // Add a second column style. DataGridColumnStyle textCol = new DataGridTextBoxColumn(); textCol.set_MappingName("custName"); textCol.set_HeaderText("Customer Name"); textCol.set_Width(250); ts1.get_GridColumnStyles().Add(textCol); // Create the second table style with columns. DataGridTableStyle ts2 = new DataGridTableStyle(); ts2.set_MappingName("Orders"); // Change the colors. ts2.set_ForeColor(Color.get_Yellow()); ts2.set_AlternatingBackColor(Color.get_Blue()); ts2.set_BackColor(Color.get_Blue()); // Create new DataGridColumnStyle objects. DataGridColumnStyle cOrderDate = new DataGridTextBoxColumn(); cOrderDate.set_MappingName("OrderDate"); cOrderDate.set_HeaderText("Order Date"); cOrderDate.set_Width(100); ts2.get_GridColumnStyles().Add(cOrderDate); PropertyDescriptorCollection pcol = this.get_BindingContext(). get_Item(myDataSet, "Customers.custToOrders"). GetItemProperties(); DataGridColumnStyle csOrderAmount = new DataGridTextBoxColumn(pcol.get_Item("OrderAmount"), "c", true); csOrderAmount.set_MappingName("OrderAmount"); csOrderAmount.set_HeaderText("Total"); csOrderAmount.set_Width(100); ts2.get_GridColumnStyles().Add(csOrderAmount); // Add the DataGridTableStyle objects to the collection. myDataGrid.get_TableStyles().Add(ts1); myDataGrid.get_TableStyles().Add(ts2); } //AddCustomDataTableStyle

System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.DataGridTableStyle


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DataGridTableStyle コンストラクタ ()
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


新しい DataGridTableStyle を作成し、GridTableStylesCollection に追加するコード例を次に示します。
Private Sub AddGridTable() Dim myGridTableStyle As DataGridTableStyle myGridTableStyle = New DataGridTableStyle() myGridTableStyle.MappingName = "Customers" dataGrid1.TableStyles.Add(myGridTableStyle) End Sub
private void AddGridTable(){ DataGridTableStyle myGridTableStyle; myGridTableStyle = new DataGridTableStyle(); myGridTableStyle.MappingName = "Customers"; dataGrid1.TableStyles.Add(myGridTableStyle); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DataGridTableStyle コンストラクタ (CurrencyManager)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Sub New ( _ listManager As CurrencyManager _ )
Dim listManager As CurrencyManager Dim instance As New DataGridTableStyle(listManager)
public DataGridTableStyle ( CurrencyManager listManager )
public: DataGridTableStyle ( CurrencyManager^ listManager )
public DataGridTableStyle ( CurrencyManager listManager )
public function DataGridTableStyle ( listManager : CurrencyManager )
- listManager
使用する CurrencyManager。

DataTable の CurrencyManager を使用して、新しい DataGridTableStyle を作成するコード例を次に示します。
Private Sub CreateDataGridGridTableStyle() Dim myCurrencyManager As CurrencyManager Dim myGridTableStyle As DataGridTableStyle ' Get the CurrencyManager for a DataTable named "Customers" ' found in a DataSet named "myDataSet". myCurrencyManager = CType _ (Me.BindingContext(myDataSet, "Customers"), CurrencyManager) myGridTableStyle = New DataGridTableStyle(myCurrencyManager) ' Add the table style to the collection of a DataGrid. myDataGrid.TableStyles.Add(myGridTableStyle) End Sub 'CreateDataGridGridTableStyle
private void CreateDataGridGridTableStyle(){ CurrencyManager myCurrencyManager; DataGridTableStyle myGridTableStyle; /* Get the CurrencyManager for a DataTable named "Customers" found in a DataSet named "myDataSet". */ myCurrencyManager = (CurrencyManager) BindingContext[myDataSet, "Customers"]; myGridTableStyle = new DataGridTableStyle(myCurrencyManager); // Add the table style to the collection of a DataGrid. myDataGrid.TableStyles.Add(myGridTableStyle); }
private: void CreateDataGridGridTableStyle() { CurrencyManager^ myCurrencyManager; DataGridTableStyle^ myGridTableStyle; /* Get the CurrencyManager for a DataTable named "Customers" found in a DataSet named "myDataSet". */ myCurrencyManager = dynamic_cast<CurrencyManager^>(BindingContext[myDataSet, "Customers"]); myGridTableStyle = gcnew DataGridTableStyle( myCurrencyManager ); // Add the table style to the collection of a DataGrid. myDataGrid->TableStyles->Add( myGridTableStyle ); }
private void CreateDataGridGridTableStyle() { CurrencyManager myCurrencyManager; DataGridTableStyle myGridTableStyle; /* Get the CurrencyManager for a DataTable named "Customers" found in a DataSet named "myDataSet". */ myCurrencyManager = (CurrencyManager)( get_BindingContext(). get_Item(myDataSet, "Customers")); myGridTableStyle = new DataGridTableStyle(myCurrencyManager); // Add the table style to the collection of a DataGrid. myDataGrid.get_TableStyles().Add(myGridTableStyle); } //CreateDataGridGridTableStyle

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DataGridTableStyle コンストラクタ (Boolean)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


新しい DataGridTableStyle を作成し、GridTableStylesCollection に追加するコード例を次に示します。
Private Sub AddGridTable() Dim myGridTableStyle As DataGridTableStyle myGridTableStyle = New DataGridTableStyle() myGridTableStyle.MappingName = "Customers" dataGrid1.TableStyles.Add(myGridTableStyle) End Sub
private void AddGridTable(){ DataGridTableStyle myGridTableStyle; myGridTableStyle = new DataGridTableStyle(); myGridTableStyle.MappingName = "Customers"; dataGrid1.TableStyles.Add(myGridTableStyle); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DataGridTableStyle コンストラクタ

名前 | 説明 |
---|---|
DataGridTableStyle () | DataGridTableStyle クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
DataGridTableStyle (Boolean) | 指定した値を使用して DataGridTableStyle クラスの新しいインスタンスを初期化し、そのグリッド テーブルを既定のスタイルにするかどうかを決定します。 |
DataGridTableStyle (CurrencyManager) | CurrencyManager を指定して、DataGridTableStyle クラスの新しいインスタンスを初期化します。 |

DataGridTableStyle フィールド


関連項目
DataGridTableStyle クラスSystem.Windows.Forms 名前空間
DataGrid クラス
DataGridColumnStyle クラス
GridColumnStylesCollection
GridTableStylesCollection
DataGridTableStyle プロパティ

名前 | 説明 | |
---|---|---|
![]() | AllowSorting | DataGridTableStyle を使用する場合に、グリッド テーブルで並べ替えを実行できるかどうかを示します。 |
![]() | AlternatingBackColor | グリッドの奇数行の背景色を取得または設定します。 |
![]() | BackColor | グリッドの偶数行の背景色を取得または設定します。 |
![]() | ColumnHeadersVisible | 列ヘッダーを表示するかどうかを示す値を取得または設定します。 |
![]() | Container | Component を格納している IContainer を取得します。 ( Component から継承されます。) |
![]() | Site | Component の ISite を取得または設定します。 ( Component から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。 ( Component から継承されます。) |
![]() | DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。 ( Component から継承されます。) |
![]() | Events | Component に結び付けられているイベント ハンドラのリストを取得します。 ( Component から継承されます。) |

関連項目
DataGridTableStyle クラスSystem.Windows.Forms 名前空間
DataGrid クラス
DataGridColumnStyle クラス
GridColumnStylesCollection
GridTableStylesCollection
DataGridTableStyle メソッド

名前 | 説明 | |
---|---|---|
![]() | BeginEdit | 編集操作を要求します。 |
![]() | CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 ( MarshalByRefObject から継承されます。) |
![]() | Dispose | オーバーロードされます。 DataGridTableStyle によって使用されているリソースを解放します。 |
![]() | EndEdit | 編集操作の終了を要求します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ResetAlternatingBackColor | AlternatingBackColor プロパティを既定値にリセットします。 |
![]() | ResetBackColor | BackColor プロパティを既定値にリセットします。 |
![]() | ResetForeColor | ForeColor プロパティを既定値にリセットします。 |
![]() | ResetGridLineColor | GridLineColor プロパティを既定値にリセットします。 |
![]() | ResetHeaderBackColor | HeaderBackColor プロパティを既定値にリセットします。 |
![]() | ResetHeaderFont | HeaderFont プロパティを既定値にリセットします。 |
![]() | ResetHeaderForeColor | HeaderForeColor プロパティを既定値にリセットします。 |
![]() | ResetLinkColor | LinkColor プロパティを既定値にリセットします。 |
![]() | ResetLinkHoverColor | LinkHoverColor プロパティを既定値にリセットします。 |
![]() | ResetSelectionBackColor | SelectionBackColor プロパティを既定値にリセットします。 |
![]() | ResetSelectionForeColor | SelectionForeColor プロパティを既定値にリセットします。 |
![]() | ToString | Component の名前を格納している String を返します (存在する場合)。このメソッドはオーバーライドできません。 ( Component から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | CreateGridColumn | オーバーロードされます。 DataGridColumnStyle を作成します。 |
![]() | Dispose | オーバーロードされます。 オーバーライドされます。 DataGridTableStyle によって使用されているリソースを解放します。 |
![]() | Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 ( Component から継承されます。) |
![]() | GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 ( Component から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
![]() | OnAllowSortingChanged | AllowSortingChanged イベントを発生させます。 |
![]() | OnAlternatingBackColorChanged | AlternatingBackColorChanged イベントを発生させます。 |
![]() | OnBackColorChanged | BackColorChanged イベントを発生させます。 |
![]() | OnColumnHeadersVisibleChanged | ColumnHeadersVisibleChanged イベントを発生させます。 |
![]() | OnForeColorChanged | ForeColorChanged イベントを発生させます。 |
![]() | OnGridLineColorChanged | GridLineColorChanged イベントを発生させます。 |
![]() | OnGridLineStyleChanged | GridLineStyleChanged イベントを発生させます。 |
![]() | OnHeaderBackColorChanged | HeaderBackColorChanged イベントを発生させます。 |
![]() | OnHeaderFontChanged | HeaderFontChanged イベントを発生させます。 |
![]() | OnHeaderForeColorChanged | HeaderForeColorChanged イベントを発生させます。 |
![]() | OnLinkColorChanged | LinkColorChanged イベントを発生させます。 |
![]() | OnLinkHoverColorChanged | LinkHoverColorChanged イベントを発生させます。 |
![]() | OnMappingNameChanged | MappingNameChanged イベントを発生させます。 |
![]() | OnPreferredColumnWidthChanged | PreferredColumnWidthChanged イベントを発生させます。 |
![]() | OnPreferredRowHeightChanged | PreferredRowHeightChanged イベントを発生させます。 |
![]() | OnReadOnlyChanged | ReadOnlyChanged イベントを発生させます。 |
![]() | OnRowHeadersVisibleChanged | RowHeadersVisibleChanged イベントを発生させます。 |
![]() | OnRowHeaderWidthChanged | RowHeaderWidthChanged イベントを発生させます。 |
![]() | OnSelectionBackColorChanged | SelectionBackColorChanged イベントを発生させます。 |
![]() | OnSelectionForeColorChanged | SelectionForeColorChanged イベントを発生させます。 |
![]() | ShouldSerializeAlternatingBackColor | AlternatingBackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeBackColor | BackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeForeColor | ForeColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeGridLineColor | GridLineColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeHeaderBackColor | HeaderBackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeHeaderForeColor | HeaderForeColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeLinkColor | LinkColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeLinkHoverColor | LinkHoverColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializePreferredRowHeight | PreferredRowHeight プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeSelectionBackColor | SelectionBackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeSelectionForeColor | SelectionForeColor プロパティを永続化する必要があるかどうかを示します。 |

関連項目
DataGridTableStyle クラスSystem.Windows.Forms 名前空間
DataGrid クラス
DataGridColumnStyle クラス
GridColumnStylesCollection
GridTableStylesCollection
DataGridTableStyle メンバ
System.Windows.Forms.DataGrid コントロールによって実行時に描画されるテーブルを表します。
DataGridTableStyle データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | AllowSorting | DataGridTableStyle を使用する場合に、グリッド テーブルで並べ替えを実行できるかどうかを示します。 |
![]() | AlternatingBackColor | グリッドの奇数行の背景色を取得または設定します。 |
![]() | BackColor | グリッドの偶数行の背景色を取得または設定します。 |
![]() | ColumnHeadersVisible | 列ヘッダーを表示するかどうかを示す値を取得または設定します。 |
![]() | Container | Component を格納している IContainer を取得します。(Component から継承されます。) |
![]() | Site | Component の ISite を取得または設定します。(Component から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。(Component から継承されます。) |
![]() | DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。(Component から継承されます。) |
![]() | Events | Component に結び付けられているイベント ハンドラのリストを取得します。(Component から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | BeginEdit | 編集操作を要求します。 |
![]() | CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 (MarshalByRefObject から継承されます。) |
![]() | Dispose | オーバーロードされます。 DataGridTableStyle によって使用されているリソースを解放します。 |
![]() | EndEdit | 編集操作の終了を要求します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 (MarshalByRefObject から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 (MarshalByRefObject から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ResetAlternatingBackColor | AlternatingBackColor プロパティを既定値にリセットします。 |
![]() | ResetBackColor | BackColor プロパティを既定値にリセットします。 |
![]() | ResetForeColor | ForeColor プロパティを既定値にリセットします。 |
![]() | ResetGridLineColor | GridLineColor プロパティを既定値にリセットします。 |
![]() | ResetHeaderBackColor | HeaderBackColor プロパティを既定値にリセットします。 |
![]() | ResetHeaderFont | HeaderFont プロパティを既定値にリセットします。 |
![]() | ResetHeaderForeColor | HeaderForeColor プロパティを既定値にリセットします。 |
![]() | ResetLinkColor | LinkColor プロパティを既定値にリセットします。 |
![]() | ResetLinkHoverColor | LinkHoverColor プロパティを既定値にリセットします。 |
![]() | ResetSelectionBackColor | SelectionBackColor プロパティを既定値にリセットします。 |
![]() | ResetSelectionForeColor | SelectionForeColor プロパティを既定値にリセットします。 |
![]() | ToString | Component の名前を格納している String を返します (存在する場合)。このメソッドはオーバーライドできません。 (Component から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | CreateGridColumn | オーバーロードされます。 DataGridColumnStyle を作成します。 |
![]() | Dispose | オーバーロードされます。 オーバーライドされます。 DataGridTableStyle によって使用されているリソースを解放します。 |
![]() | Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 (Component から継承されます。) |
![]() | GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 (Component から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
![]() | OnAllowSortingChanged | AllowSortingChanged イベントを発生させます。 |
![]() | OnAlternatingBackColorChanged | AlternatingBackColorChanged イベントを発生させます。 |
![]() | OnBackColorChanged | BackColorChanged イベントを発生させます。 |
![]() | OnColumnHeadersVisibleChanged | ColumnHeadersVisibleChanged イベントを発生させます。 |
![]() | OnForeColorChanged | ForeColorChanged イベントを発生させます。 |
![]() | OnGridLineColorChanged | GridLineColorChanged イベントを発生させます。 |
![]() | OnGridLineStyleChanged | GridLineStyleChanged イベントを発生させます。 |
![]() | OnHeaderBackColorChanged | HeaderBackColorChanged イベントを発生させます。 |
![]() | OnHeaderFontChanged | HeaderFontChanged イベントを発生させます。 |
![]() | OnHeaderForeColorChanged | HeaderForeColorChanged イベントを発生させます。 |
![]() | OnLinkColorChanged | LinkColorChanged イベントを発生させます。 |
![]() | OnLinkHoverColorChanged | LinkHoverColorChanged イベントを発生させます。 |
![]() | OnMappingNameChanged | MappingNameChanged イベントを発生させます。 |
![]() | OnPreferredColumnWidthChanged | PreferredColumnWidthChanged イベントを発生させます。 |
![]() | OnPreferredRowHeightChanged | PreferredRowHeightChanged イベントを発生させます。 |
![]() | OnReadOnlyChanged | ReadOnlyChanged イベントを発生させます。 |
![]() | OnRowHeadersVisibleChanged | RowHeadersVisibleChanged イベントを発生させます。 |
![]() | OnRowHeaderWidthChanged | RowHeaderWidthChanged イベントを発生させます。 |
![]() | OnSelectionBackColorChanged | SelectionBackColorChanged イベントを発生させます。 |
![]() | OnSelectionForeColorChanged | SelectionForeColorChanged イベントを発生させます。 |
![]() | ShouldSerializeAlternatingBackColor | AlternatingBackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeBackColor | BackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeForeColor | ForeColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeGridLineColor | GridLineColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeHeaderBackColor | HeaderBackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeHeaderForeColor | HeaderForeColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeLinkColor | LinkColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeLinkHoverColor | LinkHoverColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializePreferredRowHeight | PreferredRowHeight プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeSelectionBackColor | SelectionBackColor プロパティを永続化する必要があるかどうかを示します。 |
![]() | ShouldSerializeSelectionForeColor | SelectionForeColor プロパティを永続化する必要があるかどうかを示します。 |

名前 | 説明 | |
---|---|---|
![]() | Disposed | コンポーネントの Disposed イベントを待機するイベント ハンドラを追加します。(Component から継承されます。) |
![]() | ForeColorChanged | ForeColor の値が変更された場合に発生します。 |
![]() | GridLineColorChanged | GridLineColor の値が変更された場合に発生します。 |
![]() | GridLineStyleChanged | GridLineStyle の値が変更された場合に発生します。 |
![]() | HeaderBackColorChanged | HeaderBackColor の値が変更された場合に発生します。 |
![]() | HeaderFontChanged | HeaderFont の値が変更された場合に発生します。 |
![]() | HeaderForeColorChanged | HeaderForeColor の値が変更された場合に発生します。 |
![]() | LinkColorChanged | LinkColor の値が変更された場合に発生します。 |
![]() | LinkHoverColorChanged | LinkHoverColor の値が変更された場合に発生します。 |
![]() | MappingNameChanged | MappingName の値が変更された場合に発生します。 |
![]() | PreferredColumnWidthChanged | PreferredColumnWidth プロパティの値が変更された場合に発生します。 |
![]() | PreferredRowHeightChanged | PreferredRowHeight の値が変更された場合に発生します。 |
![]() | ReadOnlyChanged | ReadOnly の値が変更された場合に発生します。 |
![]() | RowHeadersVisibleChanged | RowHeadersVisible の値が変更された場合に発生します。 |
![]() | RowHeaderWidthChanged | RowHeaderWidth の値が変更された場合に発生します。 |
![]() | SelectionBackColorChanged | SelectionBackColor の値が変更された場合に発生します。 |
![]() | SelectionForeColorChanged | SelectionForeColor の値が変更された場合に発生します。 |

関連項目
DataGridTableStyle クラスSystem.Windows.Forms 名前空間
DataGrid クラス
DataGridColumnStyle クラス
GridColumnStylesCollection
GridTableStylesCollection
Weblioに収録されているすべての辞書からDataGridTableStyleを検索する場合は、下記のリンクをクリックしてください。

- DataGridTableStyleのページへのリンク