Freigeben über


DataGrid.CaptionVisible-Eigenschaft

Ruft einen Wert ab, der angibt, ob die Beschriftung des Datenblatts angezeigt wird, oder legt diesen fest.

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

Syntax

'Declaration
Public Property CaptionVisible As Boolean
'Usage
Dim instance As DataGrid
Dim value As Boolean

value = instance.CaptionVisible

instance.CaptionVisible = value
public bool CaptionVisible { get; set; }
public:
property bool CaptionVisible {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_CaptionVisible ()

/** @property */
public void set_CaptionVisible (boolean value)
public function get CaptionVisible () : boolean

public function set CaptionVisible (value : boolean)

Eigenschaftenwert

true, wenn die Beschriftung angezeigt wird, andernfalls false. Der Standardwert ist true.

Hinweise

Wenn CaptionVisible false ist, sind die Schaltfläche Zurück, die Schaltfläche ParentRow und die Beschriftung nicht sichtbar. Da die Navigation eingeschränkt ist, werden keine Hyperlinks zu untergeordneten Tabellen angezeigt, und AllowNavigation wird auf None festgelegt.

Beispiel

Im folgenden Codebeispiel wird zwischen den Werten der CaptionVisible-Eigenschaft umgeschaltet.

Private Sub ToggleCaptionVisible(ByVal myGrid As DataGrid)
    ' Toggle the CaptionVisibleProperty.
    myGrid.CaptionVisible = myGrid.CaptionVisible Xor True
 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