Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with New button
Message
De
21/07/2008 16:17:24
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01332870
Message ID:
01332945
Vues:
8
>Hi Tim,
>I do have some code in the mmButtonNew click method. I have some code that needs to execute right after the new row is added that needs to reside in the form, so a hook method won't work. Where should I put that code? I think I have another form that has code in the click method that works correctly. Thanks.

It is ok to have code there but if you are relying on the default mechanism of the New Button you would also need a "base.OnClick(e)" in there to get the default behavior.

I had thought you might have inadvertantly added a click method causing the button to stop working. If you put a break point on the first line of code in your button does it still call the default behavior? Or are you doing all the save stuff in the button yourself?
Tim

>
>>Hi Linda,
>>
>>>I have a business form that has multiple search criteria by which users can locate records and have them displayed in a grid. When the user goes to the detail tab, the currently selected row is displayed. At one time, the new button worked correctly. Now, when I press the New button, I do not get a new row. The only things I can think of that might have affected this are (1)that I decided to use the Business Layer Generator to generate stored procedures and (2) that I put some code in the DetailPage_Enter method to reset the values of a couple of combo boxes. Any idea what may be causing the problem? Thanks.
>>
>>Is this an mmButtonNew in the form you are talking about? You might want to verify you didn't inadvertantly double click it and cause a Click Event to be created for this button as I think that would break the MM behavior already in the button.
>>Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform