DataGridTableStyle::RowHeaderWidth Property
.NET Framework (current version)
Gets or sets the width of row headers.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
When row headers are visible a plus sign is displayed in each row header if the underlying data 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.
private: void CallEventLoader() { this->Load += gcnew EventHandler( this, &DataGridTableStyle_RowHeaderWidth::DataGridTableStyle_RowHeaderWidth_Load ); } public: void AttachRowHeaderWidthChanged() { myDataGridTableStyle->RowHeaderWidthChanged += gcnew EventHandler( this, &DataGridTableStyle_RowHeaderWidth::MyDelegateRowHeaderChanged ); } private: void MyDelegateRowHeaderChanged( Object^ /*sender*/, EventArgs^ /*e*/ ) { MessageBox::Show( "Row header width is changed" ); } void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) { myDataGridTableStyle->RowHeaderWidth = 30; } void button2_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) { MessageBox::Show( String::Concat( "Row header width is: ", myDataGridTableStyle->RowHeaderWidth ) ); }
.NET Framework
Available since 1.1
Available since 1.1
Show: