Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New two New buttons
Message
From
10/07/2006 15:24:34
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01133963
Message ID:
01135097
Views:
21
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.
===============================
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform