Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with New button
Message
From
21/07/2008 18:50:44
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01332870
Message ID:
01332981
Views:
9
Linda,

>Thanks for hanging with me. I added that line of code but I'm still not having any luck. Part of the problem seems to be when I use the base.OnClick line, it references the click method of the form, not the button. I can't seem to figure out how to get to the mmButton base object.
>
>When I check the bizobject.State it shows "Added" but the values for the previous entry are still there. Should I be doing this a different way? I really want something like the HookPostAddNewRow but I want to access it from the form rather than the business object because I need to enable the controls on the form.
>
>Any ideas? Thanks.
>


First, I apparently steered you wrong. I just tested an mmButtonNew in the sample app and it doesn't seem to matter if I create a button click handler or not it still adds the new record. Therefore remove the call to the base.

You mentioned you are seeing the values from the previous entry. Are you seeing this after the mmButtonNew is clicked rather than getting a fresh row to add including the values you are changing? Do you get a fresh row to edit if you take your code out of the click method as a test? We need to figure out if your code is causing this or the default behavior is not working.

Do you have other business objects registered with this form? The mmButtonNew will should create a new record in the primary business object. Is this the primary business object you are adding to?

The call to CallStateChange with a Bind was for after saving the record. I misunderstood the problem I think and thought you were not seeing the record after saving it.

Lets start with those things.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform