バージョン

AllowDelete プロパティ (UltraDataSource)

行を削除できるかどうかを示します。デフォルトは true です。
シンタックス
'宣言
 
Public Property AllowDelete As Boolean
public bool AllowDelete {get; set;}
解説

AllowDelete を True に設定すると、このデータ ソースにバインドされたコントロールはデータ ソースに行を削除できなくなります。

使用例
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;
		}
参照