DataGridTableStyle.RowHeaderWidthChanged Event

 

Occurs when the RowHeaderWidth value changes.

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

public event EventHandler RowHeaderWidthChanged

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

The following code example demonstrates the use of this member.

private void CallEventLoader()
{
   this.Load += new EventHandler(
      this.DataGridTableStyle_RowHeaderWidth_Load);
}

public void AttachRowHeaderWidthChanged()
{
   myDataGridTableStyle.RowHeaderWidthChanged += 
                            new EventHandler(MyDelegateRowHeaderChanged);
}
private void MyDelegateRowHeaderChanged(object sender, EventArgs e)
{
   MessageBox.Show("Row header width is changed");
}

private void button1_Click(object sender, System.EventArgs e)
{  
   myDataGridTableStyle.RowHeaderWidth = 30;
}

private void button2_Click(object sender, System.EventArgs e)
{
   MessageBox.Show("Row header width is: " + 
                       myDataGridTableStyle.RowHeaderWidth);
}

.NET Framework
Available since 1.1
Return to top
Show: