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 NotSupportedException.
- prop
- The System.ComponentModel.PropertyDescriptor to search for.
- key
- The value of property to match.
The zero-based index of the item that matches the property descriptor and contains the specified value.
The System.ComponentModel.BindingList`1 class does not provide a base implementation of searching, and so BindingList`1.FindCore(PropertyDescriptor, object) always throws a NotSupportedException by default. To enable searching, derive from System.ComponentModel.BindingList`1 and perform the following tasks:
Override BindingList`1.SupportsSearchingCore to set the BindingList`1.SupportsSearchingCore property to true.
Override BindingList`1.FindCore(PropertyDescriptor, object) to implement the find algorithm.