Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie: No defaults saving data using datagrid
Message
 
À
19/08/2008 15:16:18
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:
01340105
Vues:
14
Hi Ed,

First thing that comes to mind is if this is a Web application, are you using text boxes or a grid. If you are using text boxes have you bound the web controls to the business object and its associated column and do you have the 'BindOnPostBack' property set to 'True'. When you issue NewRow, the insert is not committed until you issue a 'SaveRow' to save the values. You would then have your business object to validate the entered values and communicate with the interface accordingly.

I have never used a grid in my web app to add new rows so I can't help any further there if that is what you are doing.


>While evaluating MM .Net, I'm stumped working through a small web app. Can't get a new row inserted into table. I'm adding the new row to a datagrid seemingly OK. The insert fails because two required fields are not getting the default values. When the row is added to the datagrid, these two columns are blank. Stepping through the code confirms the default values (passed as parameters) are being assigned to the correct elements in 'public xxxxxDefaults()'.
>
>My NewRow statement is:
> // Add a new row to the DataSet
> this.oEditor.NewRow(new TblEditorDefaults(DateTime.MinValue, 1, DateTime.MinValue, 1));
>And I've tried this:
> //this.oEditor.NewRow(dsEditor, this.oEditor.TableName, new TblEditorDefaults(DateTime.MinValue, 1, DateTime.MinValue, 1));
>
>Any help would be appreciated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform