DataRepeater.VirtualModeChanged (Evento)
Se produce cuando cambia la propiedad VirtualMode.
Espacio de nombres: Microsoft.VisualBasic.PowerPacks
Ensamblado: Microsoft.VisualBasic.PowerPacks.Vs (en Microsoft.VisualBasic.PowerPacks.Vs.dll)
Sintaxis
'Declaración
Public Event VirtualModeChanged As EventHandler
public event EventHandler VirtualModeChanged
public:
event EventHandler^ VirtualModeChanged {
void add (EventHandler^ value);
void remove (EventHandler^ value);
}
member VirtualModeChanged : IEvent<EventHandler,
EventArgs>
JScript no admite eventos.
Comentarios
Utilice este evento para ejecutar código cuando el VirtualMode propiedad se cambia en tiempo de ejecución.
Para obtener más información acerca de cómo controlar eventos, vea Controlar y provocar eventos.
Ejemplos
En el ejemplo siguiente se muestra cómo controlar la VirtualModeChanged eventos.
' If the DataRepeater is in virtual mode,
' do not allow adds or deletes.
If DataRepeater1.VirtualMode = True Then
DataRepeater1.AllowUserToAddItems = False
DataRepeater1.AllowUserToDeleteItems = False
' Disable the Add button.
ProductsBindingNavigator.AddNewItem.Enabled = False
' Disable the Delete button.
ProductsBindingNavigator.DeleteItem.Enabled = False
End If
// If the DataRepeater is in virtual mode,
// do not allow adds or deletes.
if (dataRepeater1.VirtualMode == true)
{
dataRepeater1.AllowUserToAddItems = false;
dataRepeater1.AllowUserToDeleteItems = false;
// Disable the Add button.
productsBindingNavigator.AddNewItem.Enabled = false;
// Disable the Delete button.
productsBindingNavigator.DeleteItem.Enabled = false;
}
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.
Vea también
Referencia
Microsoft.VisualBasic.PowerPacks (Espacio de nombres)