Larry,
,
>I'm trying to create a simple maintenance form (1 bizobj/table) that creates a new default ID for the new records. Following the help and customerorders sample code I have
>
>protected override void btnNew_Click(...)
>{
> this.NewRow(this.oResourceType, this.grdResourceType.DataMember, new ResourceTypeDefaults());
> base.btnNew_Click(sender, e);
>}
>
>When I click on new it creates a new row on the grid (all empty cells) and prompts me 'Do you want to save changes' on the first line. Yes bombs due to the blank ID field. No takes me to the properties tab but all fields are now blank, I've lost those defaults. I've set the datagridview properties the same as the sample app.
Did you use an mmButtonNew? If so, you need to just use mmButton instead. mmButtonNew has default behind-the-scenes behavior that you don't want in this scenario.
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com