DataGridTableStyle.PreferredRowHeightChanged Evento
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Se produce cuando cambia el valor PreferredRowHeight.
public:
event EventHandler ^ PreferredRowHeightChanged;
public event EventHandler PreferredRowHeightChanged;
member this.PreferredRowHeightChanged : EventHandler
Public Custom Event PreferredRowHeightChanged As EventHandler
Tipo de evento
Ejemplos
En el ejemplo de código siguiente se muestra el uso de este miembro.
void SetUp()
{
// Create a DataSet with a table.
MakeDataSet();
// Bind the DataGrid to the DataSet.
myDataGrid->SetDataBinding( myDataSet, "Orders" );
myTableStyle = gcnew DataGridTableStyle;
// Map 'DataGridTableStyle' instance to the DataTable.
myTableStyle->MappingName = "Orders";
// Add EventHandler function for 'PreferredRowHeightChanged' Event.
myTableStyle->PreferredRowHeightChanged += gcnew EventHandler( this, &MyDataForm::RowHeight_Changed );
}
// Called when the PreferredRowHeight property of myTableStyle is modified
void RowHeight_Changed( Object^ /*sender*/, EventArgs^ /*e*/ )
{
MessageBox::Show( "PreferredRowHeight property is changed" );
}
private void SetUp()
{
// Create a DataSet with a table.
MakeDataSet();
// 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");
}
Private Sub SetUp()
' Create a DataSet with a table.
MakeDataSet()
' 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.
AddHandler myTableStyle.PreferredRowHeightChanged, AddressOf RowHeight_Changed
End Sub
' Called when the PreferredRowHeight property of myTableStyle is modified
Private Sub RowHeight_Changed(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show("PreferredRowHeight property is changed")
End Sub
Comentarios
Para obtener más información sobre el manejo de eventos, consulte controlar y provocar eventos.