BindingList.AllowRemove プロパティ
アセンブリ: System (system.dll 内)
構文Dim instance As BindingList(Of T) Dim value As Boolean value = instance.AllowRemove instance.AllowRemove = value
/** @property */ public boolean get_AllowRemove () /** @property */ public void set_AllowRemove (boolean value)
RemoveItem メソッドを使用して、リストから項目を削除できる場合は true。それ以外の場合は false。既定値は true です。
解説AllowNew プロパティは、通常、他のコンポーネントによって、項目を削除できるかどうかを確認するために使用されます。
AllowRemove が新しい値に設定されると、種類が Reset の ListChanged イベントが発生します。
使用例AllowRemove プロパティを設定する方法を次のコード例に示します。詳細については、BindingList クラスの概要のトピックを参照してください。
' Declare a new BindingListOfT with the Part business object. Private WithEvents listOfParts As BindingList(Of Part) Private Sub InitializeListOfParts() ' Create the new BindingList of Part type. listOfParts = New BindingList(Of Part) ' Allow new parts to be added, but not removed once committed. listOfParts.AllowNew = True listOfParts.AllowRemove = False ' Raise ListChanged events when new parts are added. listOfParts.RaiseListChangedEvents = True ' Do not allow parts to be edited. listOfParts.AllowEdit = False ' Add a couple of parts to the list. listOfParts.Add(New Part("Widget", 1234)) listOfParts.Add(New Part("Gadget", 5647)) End Sub
プラットフォームWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Weblioに収録されているすべての辞書からBindingList.AllowRemove プロパティを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からBindingList.AllowRemove プロパティ
を検索
- BindingList.AllowRemove プロパティのページへのリンク