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