Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maint form defaults for new rows
Message
 
À
05/07/2007 19:43:59
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01238132
Message ID:
01238154
Vues:
7
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform