Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid validating on cancel()
Message
 
À
05/07/2007 10:07:35
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:
01237929
Message ID:
01238157
Vues:
14
Jeff,

>I am processing an invoice with an invoice table (bound controls) and a child InvoicesItems table (bound in DataGridView).
>
>After adding items in the DataGridView, I call the Form.Cancel(BizObj, DataView). I get an error when the DataGridView RowValidating() routine fires. I was suprised that the RowValidating event fired when I was cancelling. When the error occurs, I have 0 rows in my InvoicesItems business object and 3 rows in my DataGridView. I called Cancel() based on a keypress, so I never changed focus from the datagridview. It also happens if I move the focus away from the grid.
>
>It only happens if I have 2 or more rows in the DataGridView. I have AllowUserToAddRows() = true.
>
>Should the RowValidating() be firing?

Are you adding new items via the business object or via the down arrow in the grid? See my warning about using the down arrow in my answer to your other post.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform