DataGridParentRowsLabelStyleとは? わかりやすく解説

DataGrid.ParentRowsLabelStyle プロパティ

行ラベル表示方法取得または設定します

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

Public Property ParentRowsLabelStyle As
 DataGridParentRowsLabelStyle
Dim instance As DataGrid
Dim value As DataGridParentRowsLabelStyle

value = instance.ParentRowsLabelStyle

instance.ParentRowsLabelStyle = value
public DataGridParentRowsLabelStyle ParentRowsLabelStyle { get;
 set; }
public:
property DataGridParentRowsLabelStyle ParentRowsLabelStyle {
    DataGridParentRowsLabelStyle get ();
    void set (DataGridParentRowsLabelStyle
 value);
}
/** @property */
public DataGridParentRowsLabelStyle get_ParentRowsLabelStyle ()

/** @property */
public void set_ParentRowsLabelStyle (DataGridParentRowsLabelStyle
 value)
public function get ParentRowsLabelStyle
 () : DataGridParentRowsLabelStyle

public function set ParentRowsLabelStyle
 (value : DataGridParentRowsLabelStyle)

プロパティ
DataGridParentRowsLabelStyle 値の 1 つ既定値Both です。

例外例外
例外種類条件

InvalidEnumArgumentException

列挙子が有効ではありませんでした

使用例使用例

ParentRowsLabelStyle プロパティ指定できる値の循環処理を設定するコード例次に示します

Private Sub ChangeParentRowLabels(ByVal
 myGrid As DataGrid)
    Static currentLabelStyle As Integer
    If currentLabelStyle = 4 Then currentLabelStyle
 = 0
    Select Case currentLabelStyle
    Case 0 
       myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.None
    Case 1
       myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.TableName
    Case 2
       myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.ColumnName
    Case 3
       myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
    Case Else
       myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
    End Select
 End Sub
 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGrid クラス
DataGrid メンバ
System.Windows.Forms 名前空間
DataGrid.AllowNavigation プロパティ
DataGrid.ParentRowsForeColor プロパティ
DataGrid.ParentRowsBackColor プロパティ
ParentRowsVisible

DataGridParentRowsLabelStyle 列挙体

DataGrid コントロールの親行ラベル表示方法指定します

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

Public Enumeration DataGridParentRowsLabelStyle
Dim instance As DataGridParentRowsLabelStyle
public enum DataGridParentRowsLabelStyle
public enum class DataGridParentRowsLabelStyle
public enum DataGridParentRowsLabelStyle
public enum DataGridParentRowsLabelStyle
メンバメンバ
 メンバ説明
Bothテーブルと列名の両方表示します。 
ColumnName親列名を表示します。 
None行ラベル表示しません。 
TableNameテーブル名を表示します。 
解説解説

この列挙体のメンバ使用して、ParentRowsLabelStyle プロパティの値を設定します

DataGrid に第 2 の DataTable への DataRelation が少なくとも 1 つある場合や、AllowNavigation プロパティ移動許可する値に設定されている場合だけ、親行が表示されます。

使用例使用例

DataGridParentRowsLabelStyle指定できる値を反復処理する例を次に示します

Private Sub ChangeParentRowLabels(ByVal
 myGrid As DataGrid)
   Static currentLabelStyle As Integer
   If currentLabelStyle = 4 Then currentLabelStyle
 = 0
   Select Case currentLabelStyle
   Case 0 
      myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.None
   Case 1
      myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.TableName
   Case 2
      myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.ColumnName
   Case 3
      myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
   Case Else
      myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
   End Select

   ' Increment the variable.
   currentLabelStyle+=1
End Sub
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.Windows.Forms 名前空間
DataGrid クラス
DataTable
DataRelation
DataGrid.ParentRowsForeColor プロパティ
DataGrid.ParentRowsBackColor プロパティ
DataGrid.ParentRowsLabelStyle プロパティ
DataGrid.ParentRowsVisible プロパティ
DataGrid.AllowNavigation プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGridParentRowsLabelStyleを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGridParentRowsLabelStyleを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGridParentRowsLabelStyle を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DataGridParentRowsLabelStyle」の関連用語

DataGridParentRowsLabelStyleのお隣キーワード
検索ランキング

   

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



DataGridParentRowsLabelStyleのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS