Version

OnInitializeTemplateAddRecord Method

Occurs when a 'template add' DataRecord is initialized
Syntax
'Declaration
 
Protected Friend Overridable Sub OnInitializeTemplateAddRecord( _
   ByVal args As InitializeTemplateAddRecordEventArgs _
) 
protected internal virtual void OnInitializeTemplateAddRecord( 
   InitializeTemplateAddRecordEventArgs args
)

Parameters

args
Remarks

Adding new records is disabled by default and is not supported by all views, e.g. CarouselView does not support adding records directly so its CarouselView.IsAddNewRecordSupported returns false. Also, the DataSource needs to support adding records. This can be determined by checking the RecordManager's RecordManager.DataSourceAllowsAddNew property.

To enable adding records set the FieldLayoutSettings's FieldLayoutSettings.AllowAddNew property to true.

Note: The location of the add record is specified via the FieldLayoutSettings's FieldLayoutSettings.AddNewRecordLocation property. These template add records are included in the ViewableRecords collection.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also