Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for a Null value
Message
 
À
31/01/2007 18:47:17
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01190997
Message ID:
01191235
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform