Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataGridTableStyle.RowHeadersVisible Property

Gets or sets a value indicating whether row headers are visible.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in

public bool RowHeadersVisible { get; set; }
/** @property */
public boolean get_RowHeadersVisible ()

/** @property */
public void set_RowHeadersVisible (boolean value)

public function get RowHeadersVisible () : boolean

public function set RowHeadersVisible (value : boolean)

Not applicable.

Property Value

true if row headers are visible; otherwise, false. The default is true.

When row headers are visible, a plus sign is displayed in each row header if the underlying DataTable has a related child table.

This property will not function until you add DataGridTableStyle objects to the GridTableStylesCollection. Until then, setting this property will have no effect.

The following code example demonstrates the use of this member.

// Instantiate the EventHandler.
public void AttachRowHeaderVisibleChanged()
   myDataGridTableStyle.RowHeadersVisibleChanged += new EventHandler (MyDelegateRowHeadersVisibleChanged);

// raise the event when RowHeadersVisible property is changed.
private void MyDelegateRowHeadersVisibleChanged(object sender, EventArgs e)
   string myString = "'RowHeadersVisibleChanged' event raised, Row Headers are";
   if (myDataGridTableStyle.RowHeadersVisible)
      myString += " visible";
      myString += " not visible";

   MessageBox.Show(myString, "RowHeader information");

// raise the event when a button is clicked.
private void myButton_Click(object sender, System.EventArgs e)
   if (myDataGridTableStyle.RowHeadersVisible)
      myDataGridTableStyle.RowHeadersVisible = false;
      myDataGridTableStyle.RowHeadersVisible = true;

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

© 2015 Microsoft