Version

AllowAddNew Property

Gets/sets whether the user can add records.
Syntax
'Declaration
 
Public Property AllowAddNew As Nullable(Of Boolean)
public Nullable<bool> AllowAddNew {get; set;}
Remarks
The ultimate default value used is false. However, this property is ignored if the DataSource does not support adding of records. For example, if it does not implement the System.ComponentModel.IBindingList interface (or that interface's System.ComponentModel.IBindingList.AllowNew property returns false) and it does not implement the System.ComponentModel.IEditableCollectionView interface (or that interface's System.ComponentModel.IEditableCollectionView.CanAddNew property returns false) and it is not a generic list whose type is not abstract and has a public parameterless constructor.
Example
The following example demonstrates enabling a fixed add new record. The AllowAddNew determines whether the user may add records and must be true in order to display the add new record. The AddNewRecordLocation is then used to initialize the placement of the record. In this case, we are setting it to OnTopFixed so that it is always in view.
<igDP:XamDataGrid DataSource="{Binding Source={StaticResource EmployeesDataSource}}">
    
<igDP:XamDataGrid.FieldLayoutSettings>
        
<igDP:FieldLayoutSettings AllowAddNew="True" AddNewRecordLocation="OnTopFixed" />
    
</igDP:XamDataGrid.FieldLayoutSettings>
</igDP:XamDataGrid>
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