DataGridParentRowsLabelStyle Wyliczenie

Definicja

Określa sposób wyświetlania etykiet wierszy nadrzędnych DataGrid kontrolki.

public enum class DataGridParentRowsLabelStyle
public enum DataGridParentRowsLabelStyle
type DataGridParentRowsLabelStyle = 
Public Enum DataGridParentRowsLabelStyle
Dziedziczenie
DataGridParentRowsLabelStyle

Pola

Both 3

Wyświetla zarówno nazwy tabeli nadrzędnej, jak i kolumny.

ColumnName 2

Wyświetla nazwę kolumny nadrzędnej.

None 0

Wyświetlanie etykiet wierszy nadrzędnych.

TableName 1

Wyświetla nazwę tabeli nadrzędnej.

Przykłady

Poniższy przykład iteruje każdą z możliwych wartości dla elementu 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

Uwagi

Użyj elementów członkowskich tego wyliczenia, aby ustawić wartość ParentRowsLabelStyle właściwości.

Wiersze nadrzędne mogą być wyświetlane tylko wtedy, gdy DataGrid element zawiera co najmniej jeden DataRelation do sekundy DataTable, a właściwość AllowNavigation jest ustawiona na wartość zezwalaną na nawigację.

Dotyczy

Zobacz też