Version

AllowAdd Property (UltraDataBand)

Indicates whether controls bound to this data source are allowed to add rows to row collections associated with this band.
Syntax
'Declaration
 
Public Property AllowAdd As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean AllowAdd {get; set;}
Remarks

Note that this property only controls whether the controls bound to this data source are allowed to add new rows. It does not control whether you can add rows to the data source directly to the UltraDataRowsCollection.

Example
Following code sets AllowAdd and AllowDelete properties on UltraDataSource and UltraDataBand objects.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDataSource


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' Setting AllowAdd to false will prevent the user from adding rows.
        Me.ultraDataSource1.AllowAdd = False

        ' Likewise setting AllowDelete to false will prevent the user from deleting rows.
        Me.ultraDataSource1.AllowDelete = False

        ' This setting can be overridden on an individual band.
        Me.ultraDataSource1.Band.ChildBands(0).AllowAdd = DefaultableBoolean.True
        Me.ultraDataSource1.Band.ChildBands(0).AllowDelete = DefaultableBoolean.True
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDataSource;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			// Setting AllowAdd to false will prevent the user from adding rows.
			this.ultraDataSource1.AllowAdd = false;

			// Likewise setting AllowDelete to false will prevent the user from deleting rows.
			this.ultraDataSource1.AllowDelete = false;

			// This setting can be overridden on an individual band.
			this.ultraDataSource1.Band.ChildBands[0].AllowAdd = DefaultableBoolean.True;
			this.ultraDataSource1.Band.ChildBands[0].AllowDelete = DefaultableBoolean.True;
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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