다음을 통해 공유


DataGridParentRowsLabelStyle 열거형

정의

주의

DataGrid is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use DataGridView instead.

DataGrid 컨트롤의 부모 행 레이블을 표시하는 방법을 지정합니다.

public enum class DataGridParentRowsLabelStyle
public enum DataGridParentRowsLabelStyle
[System.ComponentModel.Browsable(false)]
[System.Obsolete("`DataGrid` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `DataGridView` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public enum DataGridParentRowsLabelStyle
type DataGridParentRowsLabelStyle = 
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("`DataGrid` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `DataGridView` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
type DataGridParentRowsLabelStyle = 
Public Enum DataGridParentRowsLabelStyle
상속
DataGridParentRowsLabelStyle
특성

필드

Name Description
None 0

부모 행 레이블을 표시하지 않습니다.

TableName 1

부모 테이블 이름을 표시합니다.

ColumnName 2

부모 열 이름을 표시합니다.

Both 3

부모 테이블과 열 이름을 모두 표시합니다.

예제

다음 예제에서는 가능한 각 값을 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

설명

이 열거형의 멤버를 사용하여 속성 값을 ParentRowsLabelStyle 설정합니다.

부모 행은 1-1 DataRelationDataTable이상 포함된 경우 DataGrid 와 속성이 탐색을 허용하는 값으로 설정된 경우에만 AllowNavigation 표시할 수 있습니다.

적용 대상

추가 정보