Freigeben über


DataGrid.ParentRowsLabelStyle-Eigenschaft

Ruft den Anzeigestil der übergeordneten Zeilen ab oder legt diesen fest.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
Public Property ParentRowsLabelStyle As DataGridParentRowsLabelStyle
'Usage
Dim instance As DataGrid
Dim value As DataGridParentRowsLabelStyle

value = instance.ParentRowsLabelStyle

instance.ParentRowsLabelStyle = value
public DataGridParentRowsLabelStyle ParentRowsLabelStyle { get; set; }
public:
property DataGridParentRowsLabelStyle ParentRowsLabelStyle {
    DataGridParentRowsLabelStyle get ();
    void set (DataGridParentRowsLabelStyle value);
}
/** @property */
public DataGridParentRowsLabelStyle get_ParentRowsLabelStyle ()

/** @property */
public void set_ParentRowsLabelStyle (DataGridParentRowsLabelStyle value)
public function get ParentRowsLabelStyle () : DataGridParentRowsLabelStyle

public function set ParentRowsLabelStyle (value : DataGridParentRowsLabelStyle)

Eigenschaftenwert

Einer der DataGridParentRowsLabelStyle-Werte. Der Standardwert ist Both.

Ausnahmen

Ausnahmetyp Bedingung

InvalidEnumArgumentException

Der Enumerator war ungültig.

Beispiel

Im folgenden Codebeispiel werden die möglichen Werte der ParentRowsLabelStyle-Eigenschaft durchlaufen.

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
 End Sub
 

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

DataGrid-Klasse
DataGrid-Member
System.Windows.Forms-Namespace
DataGrid.AllowNavigation-Eigenschaft
DataGrid.ParentRowsForeColor-Eigenschaft
DataGrid.ParentRowsBackColor-Eigenschaft
ParentRowsVisible