DataGrid.RowHeaderWidth Property

 

Gets or sets the width of row headers.

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

public int RowHeaderWidth { get; set; }

Property Value

Type: System.Int32

The width of row headers in the System.Windows.Forms.DataGrid. The default is 35.

The following code example demonstrates the use of this member.

// Get the width of row header.
private void button9_Click(object sender, EventArgs e)
{
   Int32 myRowHeaderWidth = myDataGrid.RowHeaderWidth;
   MessageBox.Show("Width of row headers is: "+ 
            myRowHeaderWidth.ToString(), "Message",
            MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}      

.NET Framework
Available since 1.1
Return to top
Show: