'宣言 Public Property AllowAdd As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean AllowAdd {get; set;}
注: このプロパティはこのデータ ソースにバインドされたコントロールが新しい行を追加することを許可されるかどうかのみを制御します。UltraDataRowsCollectionに直接データ ソースに行を追加できるかどうかを制御しません。
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; }