Version

AllowDelete Property (UltraDataSource)

Indicates whether row deleting is allowed. Default is true.
Syntax
'Declaration
 
Public Property AllowDelete As Boolean
public bool AllowDelete {get; set;}
Remarks

Setting AllowDelete to true will prevent the controls bound to this data source from deleting rows from it.

Example
Following code sets AllowAdd, AllowDelete and ReadOnly properties on the UltraDataSource as well as UltraDataBand objects.

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


    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
        ' Following code disables adding rows in all bands except first
        ' child band. UltraDataBand object has AllowAdd property whose
        ' default value is Default, in which case AllowAdd property off 
        ' the UltraDataSource is used. However if AllowAdd off an
        ' UltraDataBand is explicitly set, it overrides the setting off
        ' the UltraDataSource. The same applies to AllowDelete and ReadOnly
        ' properties.
        ' 
        Me.UltraDataSource1.AllowAdd = False
        Me.UltraDataSource1.Band.ChildBands(0).AllowAdd = DefaultableBoolean.True

        Me.UltraDataSource1.AllowDelete = False
        Me.UltraDataSource1.Band.ChildBands(0).AllowDelete = DefaultableBoolean.True

        ' NOTE: Setting ReadOnly to true disables adding and deleting rows 
        ' regardless of the AllowAdd and AllowDelete property settings.
        Me.UltraDataSource1.ReadOnly = False
        Me.UltraDataSource1.Band.ChildBands(0).ReadOnly = DefaultableBoolean.False
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDataSource;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			// Following code disables adding rows in all bands except first
			// child band. UltraDataBand object has AllowAdd property whose
			// default value is Default, in which case AllowAdd property off 
			// the UltraDataSource is used. However if AllowAdd off an
			// UltraDataBand is explicitly set, it overrides the setting off
			// the UltraDataSource. The same applies to AllowDelete and ReadOnly
			// properties.
			// 
			this.ultraDataSource1.AllowAdd = false;
			this.ultraDataSource1.Band.ChildBands[0].AllowAdd = DefaultableBoolean.True;

			this.ultraDataSource1.AllowDelete = false;
			this.ultraDataSource1.Band.ChildBands[0].AllowDelete = DefaultableBoolean.True;

			// NOTE: Setting ReadOnly to true disables adding and deleting rows 
			// regardless of the AllowAdd and AllowDelete property settings.
			this.ultraDataSource1.ReadOnly = false;
			this.ultraDataSource1.Band.ChildBands[0].ReadOnly = DefaultableBoolean.False;
		}
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