DataGridParentRowsLabelStyle 列挙型
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
DataGrid コントロールの親行ラベルの表示方法を指定します。
public enum class DataGridParentRowsLabelStyle
C#
public enum DataGridParentRowsLabelStyle
type DataGridParentRowsLabelStyle =
Public Enum DataGridParentRowsLabelStyle
- 継承
名前 | 値 | 説明 |
---|---|---|
Both | 3 | 親テーブル名と列名の両方を表示します。 |
ColumnName | 2 | 親列名を表示します。 |
None | 0 | 親行ラベルは表示しません。 |
TableName | 1 | 親テーブル名を表示します。 |
次の例では、 に対して使用可能な各値を反復処理します DataGridParentRowsLabelStyle。
VB
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
プロパティの値を設定するには、この列挙体のメンバーを ParentRowsLabelStyle 使用します。
親行は、 に少なくとも 1 から DataRelation 2 番目DataTableの が含まれている場合DataGrid、および プロパティがナビゲーションを許可する値に設定されている場合AllowNavigationにのみ表示できます。
製品 | バージョン |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0 |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。