DataGridParentRowsLabelStyle Enumeração
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Atenção
DataGrid is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use DataGridView instead.
Especifica como as etiquetas das linhas pais de um DataGrid controlo são exibidas.
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
- Herança
- Atributos
Campos
| Name | Valor | Description |
|---|---|---|
| None | 0 | Não mostre etiquetas de fila de pai. |
| TableName | 1 | Mostra o nome da tabela principal. |
| ColumnName | 2 | Mostra o nome da coluna principal. |
| Both | 3 | Mostra tanto o nome da tabela principal como o nome das colunas. |
Exemplos
O exemplo seguinte itera através de cada um dos valores possíveis para o 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
Observações
Use os membros desta enumeração para definir o valor da ParentRowsLabelStyle propriedade.
As linhas pais só podem ser exibidas se contiverem DataGrid pelo menos um DataRelation a um segundo DataTable, e se a AllowNavigation propriedade estiver definida para um valor que permita navegação.