System
2.0.0.0
4.0.0.0
System.Collections.ObjectModel.Collection<T>
T
System.ComponentModel.IBindingList
System.ComponentModel.ICancelAddNew
System.ComponentModel.IRaiseItemChangedEvents
To be added.
The class can be used as a base class to create a two-way data-binding mechanism. provides a concrete, generic implementation of the interface. This is an alternative to implementing the complete interface, which can be difficult because of the subtle interaction between , , and the associated . However, the typical solutions programmer will use a class that provides data binding functionality, such as , instead of directly using .
supports factory-created instances through the extensible method. (This same type of extensibility is also found in other classes, such as ) In addition, since this class implements the interface, it enables transactional commits or rollbacks of the new item through the and methods.
Provides a generic collection that supports data binding.
Constructor
2.0.0.0
4.0.0.0
The following table shows initial property values for an instance of class.
-
Property
Initial Value
-
true
-
true if the list type has a default constructor; otherwise, false.
-
true
-
true
Initializes a new instance of the class using default values.
Constructor
2.0.0.0
4.0.0.0
To be added.
To be added.
To be added.
Event
2.0.0.0
4.0.0.0
System.ComponentModel.AddingNewEventHandler
The event occurs before a new object is added to the collection represented by the property. This event is raised after the method is called, but before the new item is created and added to the internal list. By handling this event, the programmer can provide custom item creation and insertion behavior without being forced to derive from the class.
For more information about supplying custom new item functionality, see the method. For more information about handling events, see Consuming Events.
Occurs before an item is added to the list.
Method
2.0.0.0
4.0.0.0
T
The method adds a new item to the collection represented by the property. To add a new item, the following logic is used:
-
The event is automatically raised.
This event can be programmatically handled to construct a new custom item. This is accomplished in the event handler by setting the property of the parameter to the new item.
Otherwise, the new item is automatically created through its public default constructor.
-
The position of the new item is tracked, but it is not added to the list until one of the following conditions are met:
-
The item is explicitly committed by a call to .
-
The item is implicitly committed by some other operation that changed the contents of the list, such as an insertion or removal of an item.
In contrast, calling the method before the item is committed will cause the new item to be discarded.
This method raises the event when the new item is committed.
Adds a new item to the collection.
The item added to the list.
Method
2.0.0.0
4.0.0.0
System.Object
The method adds a new item to the collection represented by the property. raises the event. This allows you to add a new item by setting the property of the parameter to the new item. Otherwise, the new item is automatically created through its public default constructor.
Adds a new item to the end of the collection.
The item that was added to the collection.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The property is typically used by other components to determine if editing of items in the list is allowed. When is set to a new value, a event of type will occur.
Gets or sets a value indicating whether items in the list can be edited.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The property is typically used by other components to determine if the creation of new items is allowed. defaults to true if the type contained in the list has a default constructor or the event is handled. If the event is not handled or the list type does not have a default constructor, then defaults to false.
If is explicitly set, the set value will always be used by bound objects to determine if new items can be added to the list. Whether is true or false, new items can be added by explicitly calling if the list type has a default constructor or the event is handled. In addition, setting causes a event of type to occur.
Gets or sets a value indicating whether you can add items to the list using the method.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The property is typically used by other components to determine if the removal of items is allowed.
When is set to a new value, a event of type occurs.
Gets or sets a value indicating whether you can remove items from the collection.
Method
2.0.0.0
4.0.0.0
System.Void
The class does not provide a base implementation of sorting, so always throws a by default. To enable sorting, derive from and perform the following tasks:
-
Override and implement sorting, raising the event when sorting is complete.
-
Override and implement sort removal.
-
Override and set to true.
In addition, you may want to implement the supplemental and sorting properties.
Sorts the items if overridden in a derived class; otherwise, throws a .
A that specifies the property to sort on.
One of the values.
Method
2.0.0.0
4.0.0.0
System.Void
The method rolls back a pending new item that was added through the method, but has not yet been committed.
For more information about adding and committing new items, see the method
Discards a pending new item.
The index of the of the new item to be added
Method
2.0.0.0
4.0.0.0
System.Void
The method removes all the items from the collection represented by the property.
calls the method before clearing out the collection and raises the event after it has been cleared.
Removes all elements from the collection.
Method
2.0.0.0
4.0.0.0
System.Void
The method commits a pending new item that was added through the method. If there is no new item waiting to be committed, then this method does nothing.
For more information about adding and committing new items, see the method.
Commits a pending new item to the collection.
The index of the new item to be added.
Method
2.0.0.0
4.0.0.0
System.Int32
The class does not provide a base implementation of searching, and so always throws a by default. To enable searching, derive from and perform the following tasks:
-
Override to set the property to true.
-
Override to implement the find algorithm.
Searches for the index of the item that has the specified property descriptor with the specified value, if searching is implemented in a derived class; otherwise, a .
The zero-based index of the item that matches the property descriptor and contains the specified value.
The to search for.
The value of to match.
Method
2.0.0.0
4.0.0.0
System.Void
To be added.
To be added.
To be added.
To be added.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The class does not provide a base implementation of sorting, so always returns false by default.
The class does not provide a base implementation of sorting. To enable sorting, derive a class from and:
-
Override and implement sorting raising the event when sorting is complete.
-
Override and implement sort removal.
-
Override and set to true.
In addition, you may want to implement the supplemental and s sorting properties.
Gets a value indicating whether the list is sorted.
Event
2.0.0.0
4.0.0.0
System.ComponentModel.ListChangedEventHandler
notifications for item value changes are only raised if the list item type implements the interface.
For more information about handling events, see Consuming Events.
Occurs when the list or an item in the list changes.
Method
2.0.0.0
4.0.0.0
System.Void
The event and the method allow custom-created items to be added to the list.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
Method
2.0.0.0
4.0.0.0
System.Void
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
Set the property to false if you wish to suppress events from occurring on the list.
Gets or sets a value indicating whether adding or removing items within the list raises events.
Method
2.0.0.0
4.0.0.0
System.Void
This method raises the event of type .
Removes the item at the specified index.
The zero-based index of the item to remove.
Method
2.0.0.0
4.0.0.0
System.Void
The class does not provide a base implementation of sorting, so always throws a by default. For more information about sorting, see the method.
Removes any sort applied with if sorting is implemented in a derived class; otherwise, raises .
Method
2.0.0.0
4.0.0.0
System.Void
When the is bound to Windows Forms controls, the method causes a refresh of all controls bound to the list.
Raises a event of type .
Method
2.0.0.0
4.0.0.0
System.Void
When the is bound to Windows Forms controls, the method causes a refresh of controls bound to the item at the specified position.
Raises a event of type for the item at the specified position.
A zero-based index of the item to be reset.
Method
2.0.0.0
4.0.0.0
System.Void
To be added.
To be added.
To be added.
To be added.
Property
2.0.0.0
4.0.0.0
System.ComponentModel.ListSortDirection
To be added.
The class does not provide a base implementation of sorting, so always returns by default. For more information about sorting, see the method.
Gets the direction the list is sorted.
Property
2.0.0.0
4.0.0.0
System.ComponentModel.PropertyDescriptor
To be added.
returns null by default because the class does not provide a base implementation of sorting. To enable sorting, derive a class from and:
-
Override and implement sorting.
-
Override and implement sort removal.
-
Override and set to true.
-
Optionally, override the to return the used for sorting.
Gets the property descriptor that is used for sorting the list if sorting is implemented in a derived class; otherwise, returns null.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
provides the implementation for . You can derive a class from and override the default value.
Gets a value indicating whether events are enabled.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The class does not provide a base implementation of searching, so always returns false by default. For more information about implementing searching, see the method.
Gets a value indicating whether the list supports searching.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The property indicates whether the supports sorting with the method.
The class does not provide a base implementation of sorting, so always returns false by default. For more information about implementing sorting, see the method.
Gets a value indicating whether the list supports sorting.
Method
2.0.0.0
4.0.0.0
System.Void
To be added.
The base implementation of this method does nothing. If this functionality is desired, a derived class must implement it.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Method
2.0.0.0
4.0.0.0
System.Object
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
This implementation calls to add a new item to the list.
Adds a new item to the list. For more information, see .
The item added to the list.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The property is typically used by other components to determine if editing of items in the list is allowed.
Gets a value indicating whether items in the list can be edited.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
To be added.
Gets a value indicating whether new items can be added to the list using the method.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
To be added.
Gets a value indicating whether items can be removed from the list.
Method
2.0.0.0
4.0.0.0
System.Void
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
Sorts the list based on a and a . For a complete description of this member, see .
One of the values.
Method
2.0.0.0
4.0.0.0
System.Int32
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
The index of the row that has the given .
The value of the parameter to search for.
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Method
2.0.0.0
4.0.0.0
System.Void
To be added.
The base implementation of this method does nothing. If this functionality is desired, a derived class must implement it.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Method
2.0.0.0
4.0.0.0
System.Void
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see
Property
2.0.0.0
4.0.0.0
System.ComponentModel.ListSortDirection
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
2.0.0.0
4.0.0.0
System.ComponentModel.PropertyDescriptor
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
2.0.0.0
4.0.0.0
System.Boolean
To be added.
checks the list type to see if it implements the interface to indicate that it raises events of when property values are changed on individual list items. This member cannot be overridden in a derived class.
Gets a value indicating whether item property value changes raise events of type . This member cannot be overridden in a derived class.