Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add more than 1 child to a NEW parent
Message
 
À
07/09/2004 12:41:32
Max Fillmore
Essential Skills, Inc.
Lenexa, Kansas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00938881
Message ID:
00940314
Vues:
20
Max,

>Any thoughts on this one?

First of all, I noticed the Order Detail DataGrid is set to allow entering new records by pressing the down arrow. I've recently changed this (by setting the grid's AddRowsWithDownArrow property to false) because it's best not to add new rows outside the context of a business object.

Also, try changing the code in the btnNewDetail button to the following (you can simply remove the second, btnNewItem button):
Private Sub btnNewDetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewDetail.Click
    Me.oOrderDetail.NewRow(New OrderDetailDefaultValues(Integer.Parse(Me.txtOrderID.Text)))
    Me.grdOrderDetail.NavigateData(mmNavigate.Last)
    Me.grdOrderDetail.Focus()
End Sub
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