Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie: No defaults saving data using datagrid
Message
De
20/08/2008 11:15:52
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
20/08/2008 11:09:55
Ed Milner
National Care Connection
Colorado, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01340081
Message ID:
01340387
Vues:
10
Hi Ed,

>I got clarification from Kevin on this.
>
>The problem is that the .NET GridView completely bypasses the business object when you use the feature that automatically adds a new row. It goes behind the scenes and adds a new row to the associated DataTable, so the business object is not notified and the new values can’t be added. I recommend adding a New button to the form (mmButtonNew) that adds a new entity to the business object instead—then all your default value behavior kicks in.
>

>
>Thanks everyone.

Now I am confused a bit; can you clarify this?
You posted this originally:
// Add a new row to the DataSet
> this.oEditor.NewRow(new TblEditorDefaults(DateTime.MinValue, 1, DateTime.MinValue, 1));

In that code you are calling NewRow on the business object. Above you say the business object is not involved. Did I miss something or is oEditor not the business objecct?
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform