Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Maint form defaults for new rows
Versions des environnements
Hi
,
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.
Any suggestions?
thanks,
Larry
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement