DataGridTableStyle.PreferredRowHeightChanged Event


Occurs when the PreferredRowHeight value changes.

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

public event EventHandler PreferredRowHeightChanged

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

The following code example demonstrates the use of this member.

private void SetUp()
   // Create a DataSet with a table.
   // Bind the DataGrid to the DataSet.
   myDataGrid.SetDataBinding(myDataSet, "Orders");
   myTableStyle = new DataGridTableStyle();
   // Map 'DataGridTableStyle' instance to the DataTable.
   myTableStyle.MappingName = "Orders";
   // Add EventHandler function for 'PreferredRowHeightChanged' Event.
   myTableStyle.PreferredRowHeightChanged+=new EventHandler(RowHeight_Changed);
// Called when the PreferredRowHeight property of myTableStyle is modified
private void RowHeight_Changed(object sender, EventArgs e)
   MessageBox.Show("PreferredRowHeight property is changed");

.NET Framework
Available since 1.1
Return to top