Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MmPicker
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
00982169
Message ID:
00984374
Vues:
16
Hi,

The solution to my problem was to bind all the mmPickers to the same
business object and use mmPicker event ItemSelected to call a data
retrieval method on that business object. When the mmPickListForm closes
the ItemSelected event takes the necessary column values from the picklist
table and calls the method on the business object.

For example:

private void PersonPicker_ItemSelected(object sender,
mmPickerItemSelectedEventArgs e)
{
// the PickList Table will only have one row as picklist
multiselect is false
DataRow selected =
e.dsSelectedItems.Tables["PickList"].Rows[0];
oPerson.GetPersonByPK(selected[""].ToString());
}

Regards,


>Einar,
>
>>I would like to use the mmPicker to enable users to quickly find a record in a business object. The business form contains an mmPicker for each column in the underlying business object (for example if the form shows a person's details there would be a mmPicker for each of the columns in the person business object, ie PersonFirstName, PersonLastName etc. instead of using mmTextBoxes)
>>
>>What I want to do is to have all the Person's mmPickers show their respective column's text after a user has used one of them to find the record they are interested in.
>>
>>An example use case would be : 1. User decides to look up a person record by the person's last name 2. User clicks on the PersonLastName mmPicker and chooses the person record from the mmPickListForm 3. The person's column values are shown in all the Person mmPickers (not just the last name displayed in the LastName mmPicker as it does at present).
>>
>>Is this possible or is the mmPicker designed to show only the returning data in the one mmPicker text box?
>
>It's kind of an unusual usage of the control...you can think of the picker control as a specialized combobox...What you're suggesting is similar to having many combo boxes on the same form for a similar purpose. Although I don't completely understand your scenario, you could make it work by having the business object the controls are listening to navigate to the correct DataRow and raise a Navigated event.
>
>Regards,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform