Bindingsource.find method

Bindingsource.find method

Old forum URL: forums.lhotka.net/forums/t/1027.aspx


kasvis posted on Friday, August 25, 2006

I am having trouble with the find method. It throws the following exception "Specified method is not supported". Is there any workaround for it.
Thanks

Tray replied on Friday, August 25, 2006

Kasvis,

The NotSupportedException is thrown if the underlying IBindingList object (the object that the BindingSource object was created with) does not support searching. This is a property of the IBindingList interface: IBindingList.SupportsSearching. If this is false, then you cannot search the list.

The IBindingSource interface has a property to check this: IBindingSource.SupportsSearching. If this is false, the IBindingSource does not support the Find method.

To implement searching capabilities on a IBindingList, there are 6 methods and 9 properties to implement. For further info, check out IBindingList in Help.

Hope this helps,
Tray

 

Copyright (c) Marimer LLC