다음을 통해 공유


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에 두 번째 DataTable에 대한 하나 이상의 DataRelation이 포함되어 있거나 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

플랫폼

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에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

System.Windows.Forms 네임스페이스
DataGrid 클래스
DataTable
DataRelation
DataGrid.ParentRowsForeColor 속성
DataGrid.ParentRowsBackColor 속성
DataGrid.ParentRowsLabelStyle 속성
DataGrid.ParentRowsVisible 속성
DataGrid.AllowNavigation 속성