Expandir Minimizar
Este tema aún no ha recibido ninguna valoración - Valorar este tema

DataGridView.RowHeightChanged (Evento)

Actualización: noviembre 2007

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)
public event DataGridViewRowEventHandler RowHeightChanged
/** @event */
public void add_RowHeightChanged (DataGridViewRowEventHandler value)
/** @event */
public void remove_RowHeightChanged (DataGridViewRowEventHandler value)

JScript no admite eventos.

Para obtener más información sobre la forma de controlar 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;
}


Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

.NET Framework

Compatible con: 3.5, 3.0, 2.0
¿Te ha resultado útil?
(Caracteres restantes: 1500)

Adiciones de comunidad

AGREGAR
© 2013 Microsoft. Reservados todos los derechos.