Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New two New buttons
Message
De
10/07/2006 15:24:34
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Divers
Thread ID:
01133963
Message ID:
01135097
Vues:
22
Following your suggestions didn't work, probably because I _am_ using VB. Any workaround?

I had to create a whole new "new row with defaults" routine.
Ah, well, better control over the application which is what I guess I want to do anyway. Right?

Now that I got the Requisition form working with two buttons, I'm having problems with getting the items record created. Seems that using the "Business Layer Generator" didn't correctly initialize the fields. The fields have to be initialized somewhere, but I can't see where. Looks like I'll have to create a new "new row with defaults" routine with my line items and receiver rows as well.

CU

===============================
1. Add the button to your form

2. Set its BindingFlag property to false (this prevents default New button behavior from kicking in)

3. With the New button selected, go to the Properties Window, and click the lightning bolt to see the list of events

4. Select the Click event and open its associated combo box. You should see btnNew_Click in the list. Select this handler method

Now both buttons will run the same code. If you DON'T see btnNew_Click in the list, are you using VB .NET or C#? VB .NET has a bug when it comes to registering handlers inherited from parent forms. If this is the case, you need to manually wire up btnNew_Click method handler with your second New button.
===============================
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform