Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie: No defaults saving data using datagrid
Message
From
19/08/2008 16:22:42
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
19/08/2008 15:16:18
Ed Milner
National Care Connection
Colorado, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01340081
Message ID:
01340138
Views:
9
Hi Ed,

In addition to what Bob said, did you specify default values for those fields when you ran the business layer generator? This way the defaults would be automatic without your needing to pass in those values.
Tim


>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.
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform