Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DataGridTableStyle.RowHeadersVisibleChanged Event

Occurs when the RowHeadersVisible value changes.

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

public event EventHandler RowHeadersVisibleChanged

For more information about handling events, see Handling and Raising Events.

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";
   else
      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;
   else
      myDataGridTableStyle.RowHeadersVisible = true;
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft