DataGrid.RowHeaderWidth Property

Definition

Gets or sets the width of row headers.

C#
public int RowHeaderWidth { get; set; }

Property Value

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

Examples

The following code example demonstrates the use of this member.

C#
// 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);
}

Applies to

Produkt Versionen
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0