Tim,
I want to use the default behavior if possible. I modified my click method as shown below but it just ignores the base.OnClick line. I set a break on the base.OnClick line but it didn't follow that code anywhere. Did I type something wrong? Thanks.
private void btnNew_Click(object sender, EventArgs e)
{
base.OnClick(e);
this.ChangeEditStatus(((mmButton)sender).Parent, "Edit");
}
>>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
Linda Harmes
HiBit Technologies, Inc.