Dave,
You can pretty much modify the picker or one of its associated classes to do anything you want. In your case I recommend the following:
- Create a subclass of the OakLeaf.MM.Main.Business.mmPickListBusinessObject class
- Override the picklist business object's GetPickList() method, and modify the command parameter to suit your needs. From your description, it sounds like you want to modify the WHERE clause so multiple fields are searched for the specified value. For example:
public class MyPickListBusinessObject : OakLeaf.MM.Main.Business.mmPickListBusinessObject
{
public virtual DataSet GetPickList(string command, CommandType cmdType, IDbDataParameter[] parameters)
{
return base.GetPickList(command, cmdType, parameters);
}
}
- Create a subclass of the OakLeaf.MM.Main.Windows.Forms.mmPicker class
- Override the picker's CreatePickListBusinessObject() method and add code that returns your custom picklist business object. For example:
public class MyPicker : OakLeaf.MM.Main.Windows.Forms.mmPicker
{
public override ImmPickListBusinessObject CreatePickListBusinessObject()
{
return new MyPickListBusinessObject();
}
}
- Add the new MyPicker class to your Visual Studio toolbox and use it on your form
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com