DataGridView.RowHeightChanged (Evento)
.NET Framework 2.0
Se produce cuando cambia el valor de la propiedad Height para una fila.
Espacio de nombres: System.Windows.Forms
Ensamblado: System.Windows.Forms (en system.windows.forms.dll)
Ensamblado: System.Windows.Forms (en system.windows.forms.dll)
Para obtener más información sobre el control de eventos, vea Utilizar eventos.
En el ejemplo de código siguiente se muestra el uso de este evento. Este ejemplo forma parte de un ejemplo más extenso proporcionado en Cómo: Personalizar la apariencia de las filas en el control DataGridView de formularios Windows Forms.
// Adjusts the padding when the user changes the row height so that // the normal cell content is fully displayed and any extra // height is used for the content that spans multiple columns. void dataGridView1_RowHeightChanged(object sender, DataGridViewRowEventArgs e) { // Calculate the new height of the normal cell content. Int32 preferredNormalContentHeight = e.Row.GetPreferredHeight(e.Row.Index, DataGridViewAutoSizeRowMode.AllCellsExceptHeader, true) - e.Row.DefaultCellStyle.Padding.Bottom; // Specify a new padding. Padding newPadding = e.Row.DefaultCellStyle.Padding; newPadding.Bottom = e.Row.Height - preferredNormalContentHeight; e.Row.DefaultCellStyle.Padding = newPadding; }