BindingList.AllowEdit プロパティ
アセンブリ: System (system.dll 内)
構文Dim instance As BindingList(Of T) Dim value As Boolean value = instance.AllowEdit instance.AllowEdit = value
/** @property */ public boolean get_AllowEdit () /** @property */ public void set_AllowEdit (boolean value)
リスト項目を編集できる場合は true。それ以外の場合は false。既定値は true です。
解説AllowEdit プロパティは、通常、他のコンポーネントによって、リスト内の項目を編集できるかどうかを確認するために使用されます。AllowEdit が新しい値に設定されると、種類が Reset の ListChanged イベントが発生します。
使用例AllowEdit プロパティを設定する方法を次のコード例に示します。詳細については、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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照- BindingList.AllowEdit プロパティのページへのリンク