DataGridParentRowsLabelStyle Výčet
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Upozornění
DataGrid is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use DataGridView instead.
Určuje, jak se zobrazí popisky nadřazených řádků ovládacího prvku 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
- Dědičnost
- Atributy
Pole
| Name | Hodnota | Description |
|---|---|---|
| None | 0 | Nezobrazují se žádné popisky nadřazených řádků. |
| TableName | 1 | Zobrazí název nadřazené tabulky. |
| ColumnName | 2 | Zobrazí název nadřazeného sloupce. |
| Both | 3 | Zobrazí názvy nadřazených tabulek i sloupců. |
Příklady
Následující příklad iteruje každou z možných hodnot pro DataGridParentRowsLabelStyleobjekt .
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
Poznámky
Pomocí členů tohoto výčtu nastavte hodnotu ParentRowsLabelStyle vlastnosti.
Nadřazené řádky lze zobrazit pouze v případě, že DataGrid obsahuje alespoň jeden DataRelation až druhý DataTable, a pokud AllowNavigation je vlastnost nastavena na hodnotu, která umožňuje navigaci.