DataGridColumnStyle.WidthChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the Width property value changes.
public:
event EventHandler ^ WidthChanged;
public event EventHandler WidthChanged;
member this.WidthChanged : EventHandler
Public Custom Event WidthChanged As EventHandler
Event Type
Examples
The following code example demonstrates the use of this member.
// Add the 'Customer ID' column style.
DataGridColumnStyle^ myIDCol = gcnew DataGridTextBoxColumn;
myIDCol->MappingName = "custID";
myIDCol->HeaderText = "Customer ID";
myIDCol->Width = 100;
myIDCol->WidthChanged += gcnew EventHandler( this, &MyForm::MyIDColumnWidthChanged );
myDataGridTableStyle->GridColumnStyles->Add( myIDCol );
// Add the 'Customer ID' column style.
DataGridColumnStyle myIDCol = new DataGridTextBoxColumn();
myIDCol.MappingName = "custID";
myIDCol.HeaderText = "Customer ID";
myIDCol.Width = 100;
myIDCol.WidthChanged += new EventHandler(MyIDColumnWidthChanged);
myDataGridTableStyle.GridColumnStyles.Add(myIDCol);
' Add the 'Customer ID' column style.
Dim myIDCol As DataGridTextBoxColumn = New DataGridTextBoxColumn()
myIDCol.MappingName = "custID"
myIDCol.HeaderText = "Customer ID"
myIDCol.Width = 100
AddHandler myIDCol.WidthChanged, AddressOf MyIDColumnWidthChanged
myDataGridTableStyle.GridColumnStyles.Add(myIDCol)
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.