Share via


DataRepeater.ItemCloning Event

Occurs before the DataRepeaterItem and its controls are cloned from the ItemTemplate.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
Public Event ItemCloning As DataRepeaterItemCloneEventHandler
public event DataRepeaterItemCloneEventHandler ItemCloning
public:
 event DataRepeaterItemCloneEventHandler^ ItemCloning {
    void add (DataRepeaterItemCloneEventHandler^ value);
    void remove (DataRepeaterItemCloneEventHandler^ value);
}
member ItemCloning : IEvent<DataRepeaterItemCloneEventHandler,
    DataRepeaterItemCloneEventArgs>
JScript does not support events.

Remarks

Use this event to run custom code before cloning or to override the cloning process.

The DataRepeaterItemCloneEventArgs class contains a handled parameter that specifies whether the control should handle the cloning. If you set handled to true, you override the default cloning process and must handle all cloning yourself. To run custom code before the default cloning starts, set the handled parameter to false.

Note

If you want to make minor changes to the cloning process, consider using the ItemCloned event instead of this one.

For more information about how to handle events, see Consuming Events.

.NET Framework Security

See Also

Reference

DataRepeater Class

Microsoft.VisualBasic.PowerPacks Namespace

ItemCloned

Other Resources

Introduction to the DataRepeater Control (Visual Studio)