Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for a Null value
Message
 
To
31/01/2007 18:47:17
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01190997
Message ID:
01191235
Views:
15
Jeff,

>>>I thought I would just set a default value (it works in this case) by setting the value in HookSetDefaultValues() for the business object.
>>>
>>>My data is being edited in a DataGridView. When the row is added, the HookSetDefaultValues() event does not fire. The BindingSource is set to the business object I am checking.
>>>
>>>Any ideas what I might be doing wrong?
>
>>How is the user adding the new row? Through a New button?
>
>The DataGridView has AllowUserToAddRows set to true. When the user completes the row they move to the next row.

That's the problem...this setting adds a new row directly to the underlying DataTable completely bypassing the business object. Although it's convenient, I recommend turning it off because you lose control of the process of adding a new row.

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

Click here to load this message in the networking platform