Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MmPicker look in more than one column
Message
 
To
09/05/2005 23:42:33
Dave Porter
Medical Systematics, Inc.
Merced, California, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01011933
Message ID:
01012693
Views:
22
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:

  1. Create a subclass of the OakLeaf.MM.Main.Business.mmPickListBusinessObject class

  2. 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)
       {
          // Add code that modifies the command parameter
          return base.GetPickList(command, cmdType, parameters);
       }
    }
  3. Create a subclass of the OakLeaf.MM.Main.Windows.Forms.mmPicker class

  4. 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();
       }
    }
  5. 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform